formatjson 0.1.0

🧛 Count-ing lines, AH AH AHH!
Documentation

formatjson

A simple JSON formatter written in Rust.

For documentation check the docs.rs page.

Installation

cargo install formatjson

Usage

  • As a command-line tool:

    $ formatjson example.json
    Successfully formatted example.json
    
  • As a library:

    fn main() {
        let json = formatjson::format_json(r#"{"foo":"bar"}"#).unwrap();
        println!("{}", json);
    }
    
    $ cargo run
    {
      "foo": "bar"
    }