{"id":21093859,"url":"https://github.com/prataprc/jsondata","last_synced_at":"2025-12-12T11:44:17.589Z","repository":{"id":57634650,"uuid":"161992632","full_name":"prataprc/jsondata","owner":"prataprc","description":"JSON processor ","archived":false,"fork":false,"pushed_at":"2022-12-03T06:57:23.000Z","size":8554,"stargazers_count":9,"open_issues_count":14,"forks_count":3,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-14T17:12:29.464Z","etag":null,"topics":["bigdata","json","json5","rust","rust-lang"],"latest_commit_sha":null,"homepage":"https://docs.rs/jsondata","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prataprc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-16T11:04:49.000Z","updated_at":"2023-11-12T21:15:06.000Z","dependencies_parsed_at":"2023-01-23T07:45:29.396Z","dependency_job_id":null,"html_url":"https://github.com/prataprc/jsondata","commit_stats":null,"previous_names":["bnclabs/jsondata"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prataprc%2Fjsondata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prataprc%2Fjsondata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prataprc%2Fjsondata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prataprc%2Fjsondata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prataprc","download_url":"https://codeload.github.com/prataprc/jsondata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225207209,"owners_count":17438200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bigdata","json","json5","rust","rust-lang"],"created_at":"2024-11-19T22:13:06.907Z","updated_at":"2025-12-12T11:44:12.542Z","avatar_url":"https://github.com/prataprc.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"Why yet another JSON package in Rust ?\n======================================\n\n[![Rustdoc](https://img.shields.io/badge/rustdoc-hosted-blue.svg)](https://docs.rs/jsondata)\n[![GitPitch](https://gitpitch.com/assets/badge.svg)](https://gitpitch.com/bnclabs/jsondata/master?grs=github)\n[![Build Status](https://travis-ci.org/bnclabs/jsondata.svg?branch=master)](https://travis-ci.org/bnclabs/jsondata)\n\nThis crate makes several trade-offs that are tuned for big-data\nand document database.\n\n* [x] Support for 128-bit signed integers.\n* [x] Deferred conversion for JSON numbers.\n* [x] Serialization from Rust native type to JSON text.\n* [x] De-serialization from JSON text to Rust native type.\n* [x] CRUD operation on JSON documents, using [JSON Pointer][jptr].\n* [x] Sorted keys in property object.\n* [x] Streaming JSON parser.\n* [x] Support [JSON5](http://json5.org) standard.\n* [x] Common arithmetic and logic operations.\n* [x] Sortable JSON.\n\n**Useful links**\n\n* **[API Documentation](https://docs.rs/jsondata)**\n* [JSON Pointer][jptr].\n* [JSON5][json5].\n* Rust [internal discussion][rust1]  on f64 -\u003e integer.\n* [Json sort order][json-sort-order].\n* [Json operations][json-ops].\n* [Release notes](./RELEASE.md).\n\nDeferred conversion for numbers\n===============================\n\nConverting JSON numbers to Rust native type is not always desired. Especially\nin the context of big-data where data is stored in JSON format and we need to\nlookup, only, specific fields within the document.\n\nThis implementation provides deferred conversion for JSON numbers that leads\nto a **[performance improvement of upto 30%][commit-deferred]**.\n\n**Caveat**: If numerical text is greated than 128 characters, deferred conversion\nwon't work, that is, text shall be parsed immediately.\n\nCRUD operations on JSON document\n================================\n\nUsing Json Pointer it is possible to identify a specific field nested within\na JSON document. For Example, with below document:\n\n```json\n  {\n    \"age\": 26,\n    \"eyeColor\": \"green\",\n    \"name\": \"Leon Robertson\",\n    \"gender\": \"male\",\n    \"company\": \"AEORA\",\n    \"phone\": \"+1 (835) 447-2960\",\n    \"tags\": [ \"officia\", \"reprehenderit\", \"magna\" ],\n    \"friends\": [\n      {\n        \"id\": 0,\n        \"name\": \"Glenda Chan\"\n      }\n    ]\n  }\n```\n\n* **/age** shall point to value ``26``.\n* **/tags** shall point to value ``[ \"officia\", \"reprehenderit\", \"magna\" ]``.\n* **/tags/0** shall point to value ``\"officia\"``.\n* **/friends** shall point to value ``[{\"id\": 0, \"name\": \"Glenda Chan\"}]``.\n* **/friends/name** shall point to value ``\"Glenda Chan\"``.\n\n**List of operations**\n\n* [x] Get a field nested within a JSON document using [JSON Pointer][jptr].\n* [x] Set a field nested within a JSON document.\n* [x] Delete a field nested within a JSON document.\n* [x] Append string or array field withing a JSON document.\n\nJSON5\n=====\n\n* [x] Object keys may be an ECMAScript 5.1 IdentifierName.\n* [x] Objects may have a single trailing comma.\n* [x] Arrays may have a single trailing comma.\n* [ ] Strings may be single quoted.\n* [ ] Strings may span multiple lines by escaping new line characters.\n* [ ] Strings may include character escapes.\n* [x] Numbers may be hexadecimal.\n* [x] Numbers may have a leading or trailing decimal point.\n* [x] Numbers may be IEEE 754 positive infinity, negative infinity, and NaN.\n* [x] Numbers may begin with an explicit plus sign.\n* [ ] Single and multi-line comments are allowed.\n* [x] Additional white space characters are allowed.\n\n**[Track this feature](https://github.com/bnclabs/jsondata/issues/4)**.\n\nSortable JSON\n=============\n\n* **Null** type shall sort before all other types.\n* **Boolean** type shall sort after Null type.\n* **Number** type shall sort after Boolean type.\n  * f64 values that are \u003c= -2^127 will sort before all i128 integers.\n  * f64 values that are \u003e= 2^127-1 will sort after all i128 integers.\n  * NaN, Not a Number, values shall sort after all i128 integers\n  * **-Infinity** shall sort before all numbers.\n  * **+Infinity** shall sort after all numbers.\n  * **NaN** shall sort after +Infinity.\n* **String** type shall sort after Number type.\n* **Array** type shall sort after String type.\n* **Object** type shall sort after Array type.\n  * All (key,value) pairs within the object shall be presorted based\n    on the key.\n  * When comparing two objects, comparison shall start from first key\n    and proceed to the last key.\n  * If two keys are equal at a given position within the objects, then\n    its corresponding values shall be compared.\n  * When one object is a subset of another object, as in, if one object\n    contain all the (key,value) properties that the other object has\n    then it shall sort before the other object.\n\n**Useful links**\n\n- **[A detailed description of JSON sort order][json-sort-order]**.\n- Rust-lang [issue#46298](https://github.com/rust-lang/rust/issues/46298) and\n  [issue#10184](https://github.com/rust-lang/rust/issues/10184),\n  discussing saturating cast of f64 -\u003e integer.\n- Rust [internal discussion][rust1]  on f64 -\u003e integer.\n- Unicode collation [TR10](http://unicode.org/reports/tr10).\n- [ICU collation](http://userguide.icu-project.org/collation).\n- Floating point [Total ordering][fp-total-order]\n- Total ordering for floating point in [stackoverflow][sf1].\n- [Total ordering thread](https://users.rust-lang.org/t/sort-order-for-json/24166)\n  in http://users.rust-lang.org.\n- A good [blog][blog1] on floating point, to get started.\n\nOperations on JSON documents\n============================\n\n* Arithmetic operations, ADD, SUB, MUL, DIV, REM, NEG.\n* Bitwise operations, SHL, SHR, BITAND, BITOR, BITXOR.\n* Logical operations, NOT, AND, OR.\n* Index operations.\n* Range operations.\n\n**[Detailed description can be found here][json-ops].**\n\nContribution\n------------\n\n* Simple workflow. Fork - Modify - Pull request.\n* Before creating a PR,\n  * Run `make build` to confirm all versions of build is passing with\n    0 warnings and 0 errors.\n  * Run `check.sh` with 0 warnings, 0 errors and all testcases passing.\n  * Run `perf.sh` with 0 warnings, 0 errors and all testcases passing.\n  * [Install][spellcheck] and run `cargo spellcheck` to remove common spelling mistakes.\n* [Developer certificate of origin][dco] is preferred.\n\n[commit-deferred]: https://github.com/bnclabs/jsondata/commit/70e6dedf0121f16e130f224daaa23948f5a5d782\n[json5]: http://json5.org\n[jptr]: https://tools.ietf.org/html/rfc6901\n[#1]: https://github.com/bnclabs/jsondata/issues/1\n[#3]: https://github.com/bnclabs/jsondata/issues/3\n[#4]: https://github.com/bnclabs/jsondata/issues/4\n[#13]: https://github.com/bnclabs/jsondata/issues/13\n[json-sort-order]: https://prataprc.github.io/json-sort-order.html\n[json-ops]: https://prataprc.github.io/json-operations.html\n[rust1]: https://internals.rust-lang.org/t/help-us-benchmark-saturating-float-casts/6231\n[sf1]: https://stackoverflow.com/questions/8341395/what-is-a-subnormal-floating-point-number\n[fp-total-order]: https://en.m.wikipedia.org/wiki/IEEE_754#Total-ordering_predicate\n[blog1]: https://steve.hollasch.net/cgindex/coding/ieeefloat.html\n[MIT license]: https://opensource.org/licenses/MIT\n[spellcheck]: https://github.com/drahnr/cargo-spellcheck\n[dco]: https://developercertificate.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprataprc%2Fjsondata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprataprc%2Fjsondata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprataprc%2Fjsondata/lists"}