Expand description
tomson provides conversions from Toml to Json and Json to Toml
§Example
let toml = r#"
[foo]
bar = 1
"#;
let json = r#"
{"foo":{"bar":1}}
"#;
match tomson::Toml::as_json(&mut toml.to_string()) {
Ok(json) => println!("json -> {:?}", json),
Err(e) => println!("invalid toml -> {:?}", e)
};
match tomson::Json::as_toml(&mut json.to_string()) {
Ok(toml) => println!("toml -> {:?}", toml),
Err(e) => println!("invalid json -> {:?}", e)
};