10 releases
0.4.0 | Sep 22, 2022 |
---|---|
0.3.2 | Sep 7, 2021 |
0.3.1 | Jul 25, 2021 |
0.2.8 | Dec 20, 2020 |
0.2.7 | Nov 17, 2020 |
#2041 in Encoding
48 downloads per month
Used in yaml2json-rs-bin
8KB
108 lines
yaml2json-rs
yaml2json-rs is a library which helps to convert YAML document strings to JSON. Output can be returned as a string, or passed on to anything that implements io::Write
.
This library is a thin wrapper around serde-yaml and serde-json.
Usage
let yaml = r#"
hello: world
"#;
let yaml2json = Yaml2Json::new(Style::PRETTY);
let json = yaml2json.document_to_string(yaml);
println!("{}", json);
Dependencies
~2.1–3MB
~66K SLoC