11 breaking releases

✓ Uses Rust 2018 edition

new 0.12.1 May 25, 2020
0.11.0 May 25, 2020
Download history 6/week @ 2020-04-16 91/week @ 2020-04-23 39/week @ 2020-04-30 34/week @ 2020-05-07 76/week @ 2020-05-14 130/week @ 2020-05-21

105 downloads per month
Used in 2 crates

MIT license

59KB
1.5K SLoC

jsonc-parser

JSONC parser implemented in Rust.

Example

To a simple JsonValue:

use jsonc_parser::parse_to_value;

let json_value = parse_to_value(r#"{ "test": 5 } // test"#)?;
// check the json_value here

Or an AST:

use jsonc_parser::{parse_to_ast, ParseOptions};

let parse_result = parse_to_ast(r#"{ "test": 5 } // test"#, &ParseOptions {
    comments: true, // include comments in result
    tokens: true, // include tokens in result
})?;
// ...inspect parse_result for value, tokens, and comments here...

No runtime deps