2 unstable releases
0.2.0 | Aug 15, 2022 |
---|---|
0.1.0 | Aug 9, 2022 |
#42 in #json-toml
369 downloads per month
Used in wick-cli
9KB
197 lines
markup-converter
A utility to convert between YAML, TOML, and JSON
Usage
Instantiate a new Transcoder instance with a JSON, YAML, or TOML path and use .to_json()
or .to_yaml()
to convert it to the specified format.
use markup_converter::Transcoder;
fn main() -> anyhow::Result<()> {
let transcoder = Transcoder::from_path("tests/test.yaml")?;
let json_val = transcoder.to_json()?;
println!("{}", json_val);
Ok(())
}
Dependencies
~2.3–3.5MB
~72K SLoC