comments/
comments.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use simple_json_parser::parse;

fn main() {
    let content = r#"// Something
    {
        "a": 2,
        // Another
        "b": 5,
        # another comment
    }"#;

    let result = parse(content, |keys, value| {
        eprintln!("{keys:?} -> {value:?}");
    });

    assert!(result.is_ok());
}