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 jsonsyntax::{Value, Parse}; use decodedchar::DecodedChars; use locspan::Loc;

fn infallible(t: T) -> Result { Ok(t) }

let filename = "tests/inputs/ystructure500nestedarrays.json"; let input = fs::readtostring(filename).unwrap(); let Loc(value, valuelocation) = Value::parse(filename, input.decodedchars().map(infallible)).expect("parse error");

// ... ```

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.