yaml2json-rs 0.4.0

Convert YAML documents to JSON
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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](https://github.com/dtolnay/serde-yaml) and [serde-json](https://github.com/serde-rs/json).

## Usage

```
let yaml = r#"
hello: world
"#;

let yaml2json = Yaml2Json::new(Style::PRETTY);
let json = yaml2json.document_to_string(yaml);

println!("{}", json);
```