{"id":17973828,"url":"https://github.com/stranger6667/jsonschema","last_synced_at":"2026-04-18T20:04:21.567Z","repository":{"id":38328414,"uuid":"245613208","full_name":"Stranger6667/jsonschema","owner":"Stranger6667","description":"A high-performance JSON Schema validator for Rust","archived":false,"fork":false,"pushed_at":"2025-08-14T04:25:52.000Z","size":5097,"stargazers_count":661,"open_issues_count":35,"forks_count":109,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-08-19T09:57:57.570Z","etag":null,"topics":["jsonschema","python","rust","validation","webassembly"],"latest_commit_sha":null,"homepage":"https://docs.rs/jsonschema","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/Stranger6667.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"Stranger6667"}},"created_at":"2020-03-07T10:35:43.000Z","updated_at":"2025-08-18T00:52:37.000Z","dependencies_parsed_at":"2024-01-29T08:10:38.882Z","dependency_job_id":"97cde454-1711-4375-acfc-738a7ce89867","html_url":"https://github.com/Stranger6667/jsonschema","commit_stats":{"total_commits":540,"total_committers":41,"mean_commits":"13.170731707317072","dds":0.5018518518518518,"last_synced_commit":"8dc33ea41ad7a19b4c5fb67126448e101b6a9316"},"previous_names":[],"tags_count":136,"template":false,"template_full_name":null,"purl":"pkg:github/Stranger6667/jsonschema","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Fjsonschema","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Fjsonschema/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Fjsonschema/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Fjsonschema/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Stranger6667","download_url":"https://codeload.github.com/Stranger6667/jsonschema/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Stranger6667%2Fjsonschema/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271780520,"owners_count":24819294,"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","status":"online","status_checked_at":"2025-08-24T02:00:11.135Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["jsonschema","python","rust","validation","webassembly"],"created_at":"2024-10-29T17:03:29.560Z","updated_at":"2025-12-24T20:24:28.465Z","avatar_url":"https://github.com/Stranger6667.png","language":"Rust","readme":"# jsonschema\n\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/jsonschema.svg?style=flat-square\u0026color=fc8d62\u0026logo=rust\" height=\"20\"\u003e](https://crates.io/crates/jsonschema)\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-jsonschema-66c2a5?style=flat-square\u0026labelColor=555555\u0026logo=docs.rs\" height=\"20\"\u003e](https://docs.rs/jsonschema)\n[\u003cimg alt=\"build status\" src=\"https://img.shields.io/github/actions/workflow/status/Stranger6667/jsonschema/ci.yml?branch=master\u0026style=flat-square\" height=\"20\"\u003e](https://github.com/Stranger6667/jsonschema/actions?query=branch%3Amaster)\n[\u003cimg alt=\"codecov.io\" src=\"https://img.shields.io/codecov/c/gh/Stranger6667/jsonschema?logo=codecov\u0026style=flat-square\u0026token=B1EnafGlRL\" height=\"20\"\u003e](https://app.codecov.io/github/Stranger6667/jsonschema)\n[\u003cimg alt=\"Supported Dialects\" src=\"https://img.shields.io/endpoint?url=https%3A%2F%2Fbowtie.report%2Fbadges%2Frust-jsonschema%2Fsupported_versions.json\u0026style=flat-square\"\u003e](https://bowtie.report/#/implementations/rust-jsonschema)\n\nA high-performance JSON Schema validator for Rust.\n\n```rust\nuse serde_json::json;\n\nfn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let schema = json!({\"maxLength\": 5});\n    let instance = json!(\"foo\");\n\n    // One-off validation\n    assert!(jsonschema::is_valid(\u0026schema, \u0026instance));\n    assert!(jsonschema::validate(\u0026schema, \u0026instance).is_ok());\n\n    // Build \u0026 reuse (faster)\n    let validator = jsonschema::validator_for(\u0026schema)?;\n\n    // Fail on first error\n    assert!(validator.validate(\u0026instance).is_ok());\n\n    // Iterate over errors\n    for error in validator.iter_errors(\u0026instance) {\n        eprintln!(\"Error: {error}\");\n        eprintln!(\"Location: {}\", error.instance_path);\n    }\n\n    // Boolean result\n    assert!(validator.is_valid(\u0026instance));\n\n    Ok(())\n}\n```\n\nYou also can use it from the command line via the [jsonschema-cli](https://github.com/Stranger6667/jsonschema/tree/master/crates/jsonschema-cli) crate.\n\n```console\n$ jsonschema-cli schema.json -i instance.json\n```\n\nSee more usage examples in the [documentation](https://docs.rs/jsonschema).\n\n\u003e ⚠️ **Upgrading from older versions?** Check our [Migration Guide](https://github.com/Stranger6667/jsonschema/blob/master/MIGRATION.md) for key changes.\n\n## Highlights\n\n- 📚 Full support for popular JSON Schema drafts\n- 🔧 Custom keywords and format validators\n- 🌐 Blocking \u0026 non-blocking remote reference fetching (network/file)\n- 🎨 `Basic` output style as per JSON Schema spec\n- ✨ Meta-schema validation for schema documents\n- 🔗 Bindings for [Python](https://github.com/Stranger6667/jsonschema/tree/master/crates/jsonschema-py)\n- 🚀 WebAssembly support\n- 💻 Command Line Interface\n\n### Supported drafts\n\nThe following drafts are supported:\n\n- [![Draft 2020-12](https://img.shields.io/endpoint?url=https%3A%2F%2Fbowtie.report%2Fbadges%2Frust-jsonschema%2Fcompliance%2Fdraft2020-12.json)](https://bowtie.report/#/implementations/rust-jsonschema)\n- [![Draft 2019-09](https://img.shields.io/endpoint?url=https%3A%2F%2Fbowtie.report%2Fbadges%2Frust-jsonschema%2Fcompliance%2Fdraft2019-09.json)](https://bowtie.report/#/implementations/rust-jsonschema)\n- [![Draft 7](https://img.shields.io/endpoint?url=https%3A%2F%2Fbowtie.report%2Fbadges%2Frust-jsonschema%2Fcompliance%2Fdraft7.json)](https://bowtie.report/#/implementations/rust-jsonschema)\n- [![Draft 6](https://img.shields.io/endpoint?url=https%3A%2F%2Fbowtie.report%2Fbadges%2Frust-jsonschema%2Fcompliance%2Fdraft6.json)](https://bowtie.report/#/implementations/rust-jsonschema)\n- [![Draft 4](https://img.shields.io/endpoint?url=https%3A%2F%2Fbowtie.report%2Fbadges%2Frust-jsonschema%2Fcompliance%2Fdraft4.json)](https://bowtie.report/#/implementations/rust-jsonschema)\n\nYou can check the current status on the [Bowtie Report](https://bowtie.report/#/implementations/rust-jsonschema).\n\n## Notable Users\n\n- Tauri: [Config validation](https://github.com/tauri-apps/tauri/blob/c901d9fdf932bf7c3c77e9d3097fabb1fe0712af/crates/tauri-cli/src/helpers/config.rs#L173)\n- Apollo Router: [Config file validation](https://github.com/apollographql/router/blob/855cf6cc0757ca6176970ddf3ae8c98c87c632d1/apollo-router/src/configuration/schema.rs#L120)\n- qsv: [CSV record validation with custom keyword \u0026 format validator](https://github.com/jqnatividad/qsv/blob/6b6985065a1270f767d881b13aa2a27fae1958fb/src/cmd/validate.rs#L630)\n\n## Performance\n\n`jsonschema` outperforms other Rust JSON Schema validators in most scenarios:\n\n- Up to **20-470x** faster than `valico` and `jsonschema_valid` for complex schemas\n- Generally **3-20x** faster than `boon`\n\nFor detailed benchmarks, see our [full performance comparison](https://github.com/Stranger6667/jsonschema/tree/master/crates/benchmark-suite).\n\n## Minimum Supported Rust Version (MSRV)\n\nThis crate requires Rust 1.71.1 or later.\n\n## Acknowledgements\n\nThis library draws API design inspiration from the Python [`jsonschema`](https://github.com/python-jsonschema/jsonschema) package. We're grateful to the Python `jsonschema` maintainers and contributors for their pioneering work in JSON Schema validation.\n\n## Support\n\nIf you have questions, need help, or want to suggest improvements, please use [GitHub Discussions](https://github.com/Stranger6667/jsonschema/discussions).\n\n## Sponsorship\n\nIf you find `jsonschema` useful, please consider [sponsoring its development](https://github.com/sponsors/Stranger6667).\n\n## Contributing\n\nWe welcome contributions! Here's how you can help:\n\n- Share your use cases\n- Implement missing keywords\n- Fix failing test cases from the [JSON Schema test suite](https://bowtie.report/#/implementations/rust-jsonschema)\n\nSee [CONTRIBUTING.md](https://github.com/Stranger6667/jsonschema/blob/master/CONTRIBUTING.md) for more details.\n\n## License\n\nLicensed under [MIT License](https://github.com/Stranger6667/jsonschema/blob/master/LICENSE).\n\n","funding_links":["https://github.com/sponsors/Stranger6667"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstranger6667%2Fjsonschema","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstranger6667%2Fjsonschema","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstranger6667%2Fjsonschema/lists"}