prataprc / jsondata

JSON processor
https://docs.rs/jsondata
MIT License
9 stars 3 forks source link
bigdata json json5 rust rust-lang

Why yet another JSON package in Rust ?

Rustdoc GitPitch Build Status

This crate makes several trade-offs that are tuned for big-data and document database.

Useful links

Deferred conversion for numbers

Converting JSON numbers to Rust native type is not always desired. Especially in the context of big-data where data is stored in JSON format and we need to lookup, only, specific fields within the document.

This implementation provides deferred conversion for JSON numbers that leads to a performance improvement of upto 30%.

Caveat: If numerical text is greated than 128 characters, deferred conversion won't work, that is, text shall be parsed immediately.

CRUD operations on JSON document

Using Json Pointer it is possible to identify a specific field nested within a JSON document. For Example, with below document:

  {
    "age": 26,
    "eyeColor": "green",
    "name": "Leon Robertson",
    "gender": "male",
    "company": "AEORA",
    "phone": "+1 (835) 447-2960",
    "tags": [ "officia", "reprehenderit", "magna" ],
    "friends": [
      {
        "id": 0,
        "name": "Glenda Chan"
      }
    ]
  }

List of operations

JSON5

Track this feature.

Sortable JSON

Useful links

Operations on JSON documents

Detailed description can be found here.

Contribution