Strict JSON parsing and mapping library

CI Crate informations License Documentation

This library provides a strict JSON parser as defined by RFC 8259 and ECMA-404. It is built on the locspan library so as to keep track of the position of each JSON value in the parsed document.

Features

Usage

```rust use std::fs; use json_syntax::{Value, Parse, Print}; use locspan::Meta;

let filename = "tests/inputs/ystructure500nestedarrays.json"; let input = fs::readtostring(filename).unwrap(); let Meta(value, valuespan) = Value::parsestr(&input, |span| span).expect("parse error"); println!("value: {}", value.pretty_print()); ```

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.