{"id":19158751,"url":"https://github.com/kerollmops/oxidized-json-checker","last_synced_at":"2025-10-06T00:08:44.820Z","repository":{"id":45280899,"uuid":"264297087","full_name":"Kerollmops/oxidized-json-checker","owner":"Kerollmops","description":"A pushdown automaton low memory JSON bytes stream checker","archived":false,"fork":false,"pushed_at":"2021-12-24T16:40:25.000Z","size":65,"stargazers_count":13,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-27T05:51:35.623Z","etag":null,"topics":["checker","json","low-memory","pushdown-automaton","rust","streaming"],"latest_commit_sha":null,"homepage":"https://docs.rs/oxidized-json-checker","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kerollmops.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":"2020-05-15T20:56:09.000Z","updated_at":"2021-11-08T12:36:52.000Z","dependencies_parsed_at":"2022-09-05T14:00:14.749Z","dependency_job_id":null,"html_url":"https://github.com/Kerollmops/oxidized-json-checker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kerollmops%2Foxidized-json-checker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kerollmops%2Foxidized-json-checker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kerollmops%2Foxidized-json-checker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kerollmops%2Foxidized-json-checker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kerollmops","download_url":"https://codeload.github.com/Kerollmops/oxidized-json-checker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252844772,"owners_count":21813115,"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":["checker","json","low-memory","pushdown-automaton","rust","streaming"],"created_at":"2024-11-09T08:44:52.027Z","updated_at":"2025-10-06T00:08:39.785Z","avatar_url":"https://github.com/Kerollmops.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oxidized-json-checker\n\nThis is a pure Rust version of [the JSON_checker library](http://www.json.org/JSON_checker/).\n\nThis is a Pushdown Automaton that very quickly determines if a JSON text is syntactically correct. It could be used to filter inputs to a system, or to verify that the outputs of a system are syntactically correct.\n\nYou can use it with [the `std::io::Read` Rust trait](https://doc.rust-lang.org/std/io/trait.Read.html) to checked if a JSON is valid without having to keep it in memory.\n\n## Performances\n\nI ran some tests against `jq` to make sure the library when in the bounds.\nI used a big JSON lines files (8.3GB) that I converted to JSON using `jq -cs '.'` 😜\n\nYou can find those Wikipedia articles on [the benchmark repository of Paul Masurel's Tantivy](https://github.com/tantivy-search/search-benchmark-game#running).\n\n### `jq type`\n\nHow many times does `jq` takes when it comes to checking and determining the type of a JSON document?\nProbably too much, and also a little bit of memory: 12GB!\n\n```bash\n$ time cat ../wiki-articles.json | jq type\n\"array\"\n\nreal    1m55.064s\nuser    1m37.335s\nsys     0m21.935s\n```\n\n### `ojc`\n\nHow many times does it takes to `ojc`? Just a little bit less! It also consumes 0kb of memory.\n\n```bash\n$ time cat ../wiki-articles.json | ojc\nArray\n\nreal  0m56.780s\nuser  0m47.487s\nsys   0m12.628s\n```\n\n### `ojc` with SIMD\n\nHow many times does it takes to `ojc` already? 56s, that can't be true, we are in 2020...\nWhat about enabling some SIMD optimizations? Compile the binary with the `nightly` feature and here we go!\n\n```bash\n$ cargo build --release --features nightly\n$ time cat ../wiki-articles.json | ojc\nArray\n\nreal    0m15.818s\nuser    0m10.892s\nsys     0m10.721s\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerollmops%2Foxidized-json-checker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkerollmops%2Foxidized-json-checker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerollmops%2Foxidized-json-checker/lists"}