NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #48 most downloaded on PyPI
An implementation of JSON Schema validation for Python
Last release 9 months ago
07 Jan 2026
Release timing varies
gaps range from 2 weeks to 11 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
15 years old
109 releases · first in 2012
[pre-commit.ci] pre-commit autoupdate by @pre-commit-ci [bot] in #1400
urllib.request at import-time by @gudnimg in #1416uuid format by @sim642 in #1440Full Changelog: v4.25.1...v4.26.0
One column per quarter.
Decrease import time by delaying importing of urllib.request (#1416).
Fix Validator protocol init to match runtime by @sirosen in #1396
Full Changelog: v4.25.0...v4.25.1
Fix an incorrect required argument in the Validator protocol's type annotations (#1396).
Add support for the iri and iri-reference formats to the format-nongpl extra by @jkowalleck in #1388
iri and iri-reference formats to the format-nongpl extra by @jkowalleck in #1388Full Changelog: v4.24.1...v4.25.0
Add support for the iri and iri-reference formats to the format-nongpl extra via the MIT-licensed rfc3987-syntax. They were alread supported by the format extra. (#1388).
Unambiguously quote and escape properties in JSON path rendering by @kurtmckee in #1390
Full Changelog: v4.24.0...v4.24.1
Properly escape segments in ValidationError.json_path (#139).
Fix calculation of evaluated properties by @V02460 in #1351
Fix improper handling of unevaluatedProperties in the presence of additionalProperties (#1351).
Support for Python 3.8 has been dropped, as it is end-of-life.
Add some typing to the exceptions.py module by @DanielNoord in #1019
exceptions.py module by @DanielNoord in #1019Full Changelog: v4.22.0...v4.23.0
Do not reorder dictionaries (schemas, instances) that are printed as part of validation errors.
Declare support for Py3.13
Improve best_match (and thereby error messages from jsonschema.validate ) in cases where there are multiple sibling errors from applying anyOf / allOf
best_match (and thereby error messages from jsonschema.validate) in cases where there are multiple sibling errors from applying anyOf / allOf -- i.e. when multiple elements of a JSON array have errors, we now do prefer showing errors from earlier elements rather than simply showing an error for the full array (#1250).== would.Full Changelog: v4.21.1...v4.22.0
Slightly speed up the contains keyword by removing some unnecessary validator (re-)creation.
contains keyword by removing some unnecessary validator (re-)creation.Full Changelog: v4.21.0...v4.21.1
Fix the behavior of enum in the presence of 0 or 1 to properly consider True and False unequal ( #1208 ).
enum in the presence of 0 or 1 to properly consider True and False unequal (#1208).{min,max}{Items,Length,Properties} when they're checking for emptiness rather than true length.Full Changelog: v4.20.0...v4.21.0
jsonschema.exceptions.ErrorTree.__setitem__ is now deprecated. More broadly, in general users of jsonschema should never be mutating objects owned by…
unevaluatedItems (resp. unevaluatedProperties) when behind a $dynamicRef as specified by the 2020 and 2019 specifications.jsonschema.exceptions.ErrorTree.__setitem__ is now deprecated. More broadly, in general users of jsonschema should never be mutating objects owned by the library.Full Changelog: v4.19.2...v4.20.0
<!-- Release notes generated using configuration in .github/release.yml at v4.19.2 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.19.2 -->
additionalItems keyword into JSON Schema draft 2020-12, where it was replaced by items.Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.19.1...v4.19.2
<!-- Release notes generated using configuration in .github/release.yml at v4.19.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.19.1 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.19.0...v4.19.1
Single label hostnames are now properly considered valid according to the hostname format. This is the behavior specified by the relevant RFC (1123). IDN hostname behavior was already correct.
Importing the Validator protocol directly from the package root is deprecated. Import it from jsonschema.protocols.Validator instead.
<!-- Release notes generated using configuration in .github/release.yml at v4.19.0 -->
Validator protocol directly from the package root is deprecated. Import it from jsonschema.protocols.Validator instead.referencing library behavior.Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.6...v4.19.0
<!-- Release notes generated using configuration in .github/release.yml at v4.18.6 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.6 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.5...v4.18.6
Set a jsonschema specific user agent when automatically retrieving remote references (which is deprecated).
<!-- Release notes generated using configuration in .github/release.yml at v4.18.5 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.5 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.4...v4.18.5
<!-- Release notes generated using configuration in .github/release.yml at v4.18.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.4 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.3...v4.18.4
<!-- Release notes generated using configuration in .github/release.yml at v4.18.3 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.3 -->
applicable_validators in extended validators.
Specifically, validators extending early drafts where siblings of $ref were ignored will properly ignore siblings in the extended validator.Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.2...v4.18.3
Fix an additional regression with the deprecated jsonschema.RefResolver and pointer resolution.
<!-- Release notes generated using configuration in .github/release.yml at v4.18.2 -->
jsonschema.RefResolver and pointer resolution.Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.1...v4.18.2
<!-- Release notes generated using configuration in .github/release.yml at v4.18.1 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.1 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0...v4.18.1
It does so in a way that *should* be backwards compatible, preserving old behavior whilst emitting deprecation warnings.
This release majorly rehauls the way in which JSON Schema reference resolution is configured. It does so in a way that should be backwards compatible, preserving old behavior whilst emitting deprecation warnings.
jsonschema.RefResolver is now deprecated in favor of the new referencing library.
referencing will begin in beta, but already is more compliant than the existing $ref support.
This change is a culmination of a meaningful chunk of work to make $ref resolution more flexible and more correct.
Backwards compatibility should be preserved for existing code which uses RefResolver, though doing so is again now deprecated, and all such use cases should be doable using the new APIs.
Please file issues on the referencing tracker if there is functionality missing from it, or here on the jsonschema issue tracker if you have issues with existing code not functioning the same, or with figuring out how to change it to use referencing.
In particular, this referencing change includes a change concerning automatic retrieval of remote references (retrieving http://foo/bar automatically within a schema).
This behavior has always been a potential security risk and counter to the recommendations of the JSON Schema specifications; it has survived this long essentially only for backwards compatibility reasons, and now explicitly produces warnings.
The referencing library itself will not automatically retrieve references if you interact directly with it, so the deprecated behavior is only triggered if you fully rely on the default $ref resolution behavior and also include remote references in your schema, which will still be retrieved during the deprecation period (after which they will become an error).requires-python has been updated, so users using 3.7 should still receive v4.17.3 when installing the library.unevaluatedItems now properly does not consider items to be evaluated by an additionalItems schema if items is missing from the schema, as the specification says in this case that additionalItems must be completely ignored.date format checker on Python 3.11 (when format assertion behavior is enabled), where it was too liberal (#1076).unevaluatedProperties (#1075).jsonschema.RefResolver -- see above for details on the replacementjsonschema.RefResolutionError -- see above for details on the replacementjsonschema.ErrorTree -- instead import it via jsonschema.exceptions.ErrorTreejsonschema.FormatError -- instead import it via jsonschema.exceptions.FormatErrorFull Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.17.3...v4.18.0
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a10 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a10 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0a9...v4.18.0a10
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a9 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a9 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0a8...v4.18.0a9
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a8 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a8 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0a7...v4.18.0a8
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a7 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a7 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0a6...v4.18.0a7
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a6 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a6 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0a5...v4.18.0a6
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a5 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a5 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0a4...v4.18.0a5
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a4 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a4 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0a3...v4.18.0a4
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a3 -->
<!-- Release notes generated using configuration in .github/release.yml at v4.18.0a3 -->
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0a2...v4.18.0a3
documentation mistype fix by @aryanA101a in https://github.com/python-jsonschema/jsonschema/pull/1063
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.18.0a1...v4.18.0a2
It does so in a way that *should* be backwards compatible, preserving old behavior whilst emitting deprecation warnings.
This release majorly rehaul's the way in which JSON Schema reference resolution is configured. It does so in a way that should be backwards compatible, preserving old behavior whilst emitting deprecation warnings.
jsonschema.RefResolver is now deprecated in favor of the new referencing library.
referencing will begin in beta, but already is more compliant than the existing $ref support.
This change is a culmination of a meaningful chunk of work to make $ref resolution more flexible and more correct.
Backwards compatibility should be preserved for existing code which uses RefResolver, though doing so is again now deprecated, and all such use cases should be doable using the new APIs.
Please file issues on the referencing tracker if there is functionality missing from it, or here on the jsonschema issue tracker if you have issues with existing code not functioning the same, or with figuring out how to change it to use referencing.
For full details see the new referencing documentation.
requires-python has been updated, so users using 3.7 should still receive v4.17.3 when installing the library.unevaluatedItems now properly does not consider items to be evaluated by an additionalItems schema if items is missing from the schema, as the specification says in this case that additionalItems must be completely ignored.jsonschema.RefResolver -- see above for details on the replacementjsonschema.RefResolutionError -- see above for details on the replacementjsonschema.ErrorTree -- instead import it via jsonschema.exceptions.ErrorTreejsonschema.FormatError -- instead import it via jsonschema.exceptions.FormatErrorFull Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.17.3...v4.18.0a1
Fix instantiating validators with cached refs to boolean schemas rather than objects (#1018).
isoduration to isodate).Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.17.2...v4.17.3
The error message when using unevaluatedProperties with a non-trivial schema value (i.e. something other than false) has been improved (#996).
unevaluatedProperties with a non-trivial
schema value (i.e. something other than false) has been improved (#996).Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.17.0...v4.17.1
The jsonschema CLI (along with jsonschema.cli the module) are now deprecated. Use check-jsonschema instead, which can be installed via pip install che…
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.16.0...v4.17.0
Accessing jsonschema.draftN_format_checker is deprecated. Instead, if you want access to the format checker itself, it is exposed as jsonschema.valida…
$ref to a resolution URI
which is different from the resolved schema's declared $id.jsonschema.draftN_format_checker is deprecated. Instead, if you
want access to the format checker itself, it is exposed as
jsonschema.validators.DraftNValidator.FORMAT_CHECKER on any
jsonschema.protocols.Validator.Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.15.0...v4.16.0
Enable dedicated API documentation page(s) by @Julian in https://github.com/python-jsonschema/jsonschema/pull/989
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.14.0...v4.15.0
A specific API Reference page is now present in the documentation.
$ref on earlier drafts (specifically draft 7 and 6) has been "fixed" to follow the specified behavior when present alongside a sibling $id. Specifically the ID is now properly ignored, and references are resolved against whatever resolution scope was previously relevant.
FormatChecker.cls_checks is deprecated. Use FormatChecker.checks on an instance of FormatChecker instead.
FormatChecker.cls_checks is deprecated. Use FormatChecker.checks on
an instance of FormatChecker instead.unevaluatedItems has been fixed for draft 2019. It's nonetheless
discouraged to use draft 2019 for any schemas, new or old.protocols.ValidatorFull Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.13.0...v4.14.0
Add support for creating validator classes whose metaschema uses a different dialect than its schemas. In other words, they may use draft2020-12 to de
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.12.1...v4.13.0
Use rST markers in README by @hynek in https://github.com/python-jsonschema/jsonschema/pull/987
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.12.0...v4.12.1
Warn at runtime when subclassing validator classes. Doing so was not intended to be public API, though it seems some downstream libraries do so. A fut
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.11.0...v4.12.0
jsonschema deserves a ✨fancy✨ readme by @hynek in https://github.com/python-jsonschema/jsonschema/pull/983
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.10.3...v4.11.0
Make the rendered README in PyPI simpler and fancier. Thanks Hynek (#983)!
jsonschema.validators.validator_for now properly uses the explicitly provided default validator even if the $schema URI is not found.
jsonschema.validators.validator_for now properly uses the explicitly
provided default validator even if the $schema URI is not found.Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.10.2...v4.10.3
Fix a second place where subclasses may have added attrs attributes (#982).
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.10.1...v4.10.2
Fix Validator.evolve (and APIs like iter_errors which call it) for cases where the validator class has been subclassed. Doing so wasn't intended to be
iter_errors which call it) for cases
where the validator class has been subclassed. Doing so wasn't intended to be
public API, but given it didn't warn or raise an error it's of course
understandable. The next release however will make it warn (and a future one
will make it error). If you need help migrating usage of inheriting from a
validator class feel free to open a discussion and I'll try to give some
guidance (#982).Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.10.0...v4.10.1
Add support for referencing schemas with $ref across different versions of the specification than the referrer's
$ref across different versions
of the specification than the referrer'sFull Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.9.1...v4.10.0
Update some documentation examples to use newer validator releases in their sample code.
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.9.0...v4.9.1
Note however that the CLI itself is due to be deprecated shortly in favor of check-jsonschema _.
$ref resolution when the base URI is a URN or other scheme
(#544).pkgutil.resolve_name is now used to retrieve validators
provided on the command line. This function is only available on
3.9+, so 3.7 and 3.8 (which are still supported) now rely on the
pkgutil_resolve_name <https://pypi.org/project/pkgutil_resolve_name/>_
backport package. Note however that the CLI itself is due
to be deprecated shortly in favor of check-jsonschema <https://github.com/python-jsonschema/check-jsonschema>_.Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.8.0...v4.9.0
best_match no longer traverses into anyOf and oneOf when all of the errors within them seem equally applicable. This should lead to clearer error mess
best_match no longer traverses into anyOf and oneOf when all of
the errors within them seem equally applicable. This should lead to clearer
error messages in some cases where no branches were matched.Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.7.2...v4.8.0
Also have best_match handle cases where the type validator is an array.
best_match handle cases where the type validator is an
array.Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.7.1...v4.7.2
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.7.0...v4.7.1
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.7.0...v4.7.1
Enhance best match to prefer errors from matching types. by @Julian in https://github.com/python-jsonschema/jsonschema/pull/972
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.6.2...v4.7.0
Enhance best_match to prefer errors from branches of the schema which match the instance's type (#728)
docs: Fix a few typos by @timgates42 in https://github.com/python-jsonschema/jsonschema/pull/969
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.6.1...v4.6.2
Fix a number of minor typos in docstrings, mostly private ones (#969)
Type annotate format checker methods by @sirosen in https://github.com/python-jsonschema/jsonschema/pull/958
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.6.0...v4.6.1
Gut the (incomplete) implementation of recursiveRef on draft 2019. It needs completing, but for now can lead to recursion errors (e.g. #847).
Add package_url for changelog by @fhightower in https://github.com/python-jsonschema/jsonschema/pull/950
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.5.1...v4.6.0
Fix unevaluatedProperties and unevaluatedItems for types they should ignore (#949)
jsonschema now uses hatch for its build process. This should be completely transparent to end-users (and only matters to contributors).
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.5.0...v4.5.1
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.5.0...v4.5.1
Revert changes to $dynamicRef which caused a performance regression in v4.5.0
Extend dynamicRef keyword by @nezhar in https://github.com/python-jsonschema/jsonschema/pull/886
Full Changelog: https://github.com/python-jsonschema/jsonschema/compare/v4.4.0...v4.5.0
Validator classes for each version now maintain references to the correct corresponding format checker (#905)
Development has moved to a GitHub organization. No functional behavior changes are expected from the change.
Setup mypy in tox -e typing and get it to pass by @sirosen in https://github.com/Julian/jsonschema/pull/892
tox -e typing and get it to pass by @sirosen in https://github.com/Julian/jsonschema/pull/892Full Changelog: https://github.com/Julian/jsonschema/compare/v4.3.3...v4.4.0
[pre-commit.ci] pre-commit autoupdate by @pre-commit-ci in https://github.com/Julian/jsonschema/pull/897
Full Changelog: https://github.com/Julian/jsonschema/compare/v4.3.2...v4.3.3
Properly report deprecation warnings at the right stack level (#899)
perf: Cache subschemas by @Stranger6667 in https://github.com/Julian/jsonschema/pull/896
Full Changelog: https://github.com/Julian/jsonschema/compare/v4.3.1...v4.3.2
Additional performance improvements for resolving refs (#896)
perf: Cache reference lookups for subschemas by @Stranger6667 in https://github.com/Julian/jsonschema/pull/894
Full Changelog: https://github.com/Julian/jsonschema/compare/v4.3.0...v4.3.1
Resolving refs has had performance improvements (#893)
perf: Undesired fallback to brute force container uniqueness check on certain input types by @Stranger6667 in https://github.com/Julian/jsonschema/pul
jsonschema.protocols.IValidator by @sirosen in https://github.com/Julian/jsonschema/pull/890Full Changelog: https://github.com/Julian/jsonschema/compare/v4.2.1...v4.3.0
Fix undesired fallback to brute force container uniqueness check on certain input types (#893)
Implement a PEP544 Protocol for validator classes (#890)
Your coding agent can read these notes before it upgrades. Set up the MCP server →