json-parse 1.0.1

A low-level JSON parser for Rust with a simple API and full spec support.
Documentation
  • Coverage
  • 100%
    13 out of 13 items documented1 out of 1 items with examples
  • Size
  • Source code size: 46.3 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.19 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • agubelu/json-parse
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • agubelu

json-parse

build-img docs-img crates-img

A low-level JSON parser for Rust with a simple API and full spec support.

use json_parse::{parse, JsonElement::*};

let json = "[1, true, null]";
let parsed = parse(json).unwrap();

assert_eq!(parsed, Array(
    vec![Number(1.0), Boolean(true), Null]
));

Consider using this library if:

  • You need a lightweight parser with no external dependencies.
  • You want nice user-facing error messages and the ability to pinpoint exactly where a parsing error happened.
  • You need to maintain the relative order of the keys in a JSON object (for example, to build a JSON formatter).

This library may not be a good fit if:

  • You intend to use it to serialize and deserialize your own data (use serde instead).
  • You want utilities and sugar to navigate the contents of a JSON (use json instead).