yaml2json-rs

Crates.ioyaml2json-rs
lib.rsyaml2json-rs
version0.4.0
sourcesrc
created_at2020-11-15 14:52:00.989523
updated_at2022-09-22 16:36:56.255119
descriptionConvert YAML documents to JSON
homepagehttps://github.com/Nessex/yaml2json-rs/blob/master/crates/yaml2json-rs
repositoryhttps://github.com/Nessex/yaml2json-rs
max_upload_size
id312587
size7,962
Nathan Essex (Nessex)

documentation

https://docs.rs/yaml2json-rs/

README

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);
Commit count: 91

cargo fmt