#json #toml #yaml

markup-converter

A utility to convert YAML, TOML, and JSON files

2 unstable releases

0.2.0 Aug 15, 2022
0.1.0 Aug 9, 2022

#78 in #toml

Download history 6/week @ 2023-01-27 3/week @ 2023-02-03 6/week @ 2023-02-10 58/week @ 2023-02-17 2/week @ 2023-02-24 19/week @ 2023-03-03 195/week @ 2023-03-10 179/week @ 2023-03-17 40/week @ 2023-03-24 74/week @ 2023-03-31 74/week @ 2023-04-07 179/week @ 2023-04-14 32/week @ 2023-04-21 51/week @ 2023-04-28 68/week @ 2023-05-05 32/week @ 2023-05-12

205 downloads per month
Used in wick-cli

Apache-2.0

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.1–3MB
~68K SLoC