markup-converter

Crates.iomarkup-converter
lib.rsmarkup-converter
version0.2.0
sourcesrc
created_at2022-08-09 19:06:39.896479
updated_at2022-08-15 15:08:50.298094
descriptionA utility to convert YAML, TOML, and JSON files
homepage
repository
max_upload_size
id641971
size19,268
(shazaibn)

documentation

README

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(())
}
Commit count: 0

cargo fmt