Crates.io | json_pretty |
lib.rs | json_pretty |
version | 0.1.2 |
source | src |
created_at | 2016-12-28 10:02:47.814924 |
updated_at | 2017-12-31 13:07:40.9005 |
description | Simple Json prettifier for Rust language. |
homepage | |
repository | https://github.com/JunSuzukiJapan/json_pretty |
max_upload_size | |
id | 7815 |
size | 8,923 |
Simple Json prettifier for Rust language.
In Cargo.toml:
[dependencies]
json_pretty = "*"
extern crate json_pretty;
use json_pretty::PrettyFormatter;
// ...
let s = r#"{"description": "string for test", "id" : 123, "true" : true}"#;
let formatter = PrettyFormatter::from_str(s);
let result = formatter.pretty();
println!("s: {}", result);