Crates.io | markup-converter |
lib.rs | markup-converter |
version | 0.2.0 |
source | src |
created_at | 2022-08-09 19:06:39.896479 |
updated_at | 2022-08-15 15:08:50.298094 |
description | A utility to convert YAML, TOML, and JSON files |
homepage | |
repository | |
max_upload_size | |
id | 641971 |
size | 19,268 |
A utility to convert between YAML, TOML, and JSON
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(())
}