skillfed

jsonschema-rs

A high-performance JSON Schema validator for Python

jsonschema-rs v0.49.9 6.2M downloads/30d#1,951 on PyPI803
Permissive license MIT Active released

What it is and what it does

jsonschema-rs is a JSON Schema validator written in Rust and exposed to Python, designed for high-performance validation of JSON data against schema documents. It supports JSON Schema drafts 4, 6, 7, 2019-09, and 2020-12, with automatic draft detection or explicit draft-specific validators. The package provides multiple validation modes: one-off validation, reusable validator objects, error iteration, boolean checks, and structured output conforming to JSON Schema Output v1.

The library handles standard format validation (date, email, etc.) and allows custom format validators and keywords to be defined as Python functions or classes. It supports remote reference fetching, meta-schema validation, and schema bundling. With zero runtime dependencies and pre-built wheels for modern Python versions on common architectures, it aims to be a drop-in replacement for the pure-Python jsonschema library with significantly better performance.

Use it for:

  • Validate API request/response payloads against OpenAPI or JSON Schema specifications in web services
  • Check configuration files or data exports conform to expected schemas before processing
  • Implement domain-specific validation rules by defining custom keywords and format validators
  • Migrate from pure-Python jsonschema to gain performance without changing validation logic
  • Generate detailed error reports and evaluation traces for debugging schema mismatches

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

jsonschema-rs validates JSON data against JSON Schema documents using a Rust-backed implementation for high performance, supporting drafts 4 through 2020-12 with customizable format validators and keywords.

Yes. jsonschema-rs is actively maintained, has no known vulnerabilities, carries a permissive MIT license, and offers a significant performance advantage over pure-Python alternatives with minimal install friction on modern platforms. It is suitable for production use in validation-heavy workloads and as a drop-in replacement for jsonschema. Install it if you validate JSON frequently or need to support multiple schema drafts.

Install

jsonschema-rs on PyPI

pip

pip install jsonschema-rs

uv

uv add jsonschema-rs

poetry

poetry add jsonschema-rs

Installing jsonschema-rs

Before you install

Medium install friction due to compiled wheels; however, wheels are pre-built for common platforms (x86_64, aarch64, i686, Windows, macOS, Linux) and Python 3.10+, so installation typically succeeds without compilation. Actively maintained with a release 5 days old.

License in practice

MIT license is permissive and imposes no significant restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

pip install jsonschema-rs

import jsonschema_rs

schema = {"maxLength": 5}
validator = jsonschema_rs.validator_for(schema)
assert validator.is_valid("foo")

Requires Python 3.10 or later; pre-built wheels available for most platforms but may require a Rust toolchain if a wheel is unavailable for your platform.

Verify before relying

  • Performance benchmarks comparing jsonschema-rs to pure-Python alternatives in real-world workloads
  • Whether custom keyword and format validator APIs are stable or subject to breaking changes
  • Support for remote schema references and network fetching behavior (mentioned but not detailed)

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction medium — platform-specific wheel
Runtime dependencies none
Maintenance actively maintained — 5 days since the last release
Last repo commit
First released
Downloads 6,228,579/month — #1,951 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: jsonschema_rs-0.49.9-cp310-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl; jsonschema_rs-0.49.9-cp310-abi3-macosx_10_12_x86_64.whl; jsonschema_rs-0.49.9-cp310-abi3-manylinux_2_17_i686.manylinux2014_i686.whl; jsonschema_rs-0.49.9-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; jsonschema_rs-0.49.9-cp310-abi3-manylinux_2_28_aarch64.whl; jsonschema_rs-0.49.9-cp310-abi3-musllinux_1_2_aarch64.whl; jsonschema_rs-0.49.9-cp310-abi3-musllinux_1_2_x86_64.whl; jsonschema_rs-0.49.9-cp310-abi3-win32.whl; jsonschema_rs-0.49.9-cp310-abi3-win_amd64.whl; jsonschema_rs-0.49.9-cp314-cp314t-macosx_10_12_x86_64.whl; jsonschema_rs-0.49.9-cp314-cp314t-macosx_11_0_arm64.whl; jsonschema_rs-0.49.9-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; jsonschema_rs-0.49.9-cp314-cp314t-manylinux_2_28_aarch64.whl; jsonschema_rs-0.49.9-cp314-cp314t-musllinux_1_2_aarch64.whl; jsonschema_rs-0.49.9-cp314-cp314t-musllinux_1_2_x86_64.whl; jsonschema_rs-0.49.9-cp314-cp314t-win_amd64.whl; jsonschema_rs-0.49.9-cp315-cp315t-macosx_10_12_x86_64.whl; jsonschema_rs-0.49.9-cp315-cp315t-macosx_11_0_arm64.whl; jsonschema_rs-0.49.9-cp315-cp315t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; jsonschema_rs-0.49.9-cp315-cp315t-manylinux_2_28_aarch64.whl

Keywords: jsonschema, validation, rust

Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: RustTopic :: File Formats :: JSON :: JSON Schema

Tags

json schema validationvalidate json datajson schema validatorschema compliance checkingjson format validationrust json validatorschema draft support
json-validationrust-backedschema-compliance

More JSON Schema packages