jsonschema 4.24.0


pip install jsonschema

  Latest version

Released: May 26, 2025


Meta
Author: Julian Berman
Requires Python: >=3.9

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

Operating System
  • OS Independent

Programming Language
  • Python
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12
  • Python :: 3.13
  • Python :: Implementation :: CPython
  • Python :: Implementation :: PyPy

Topic
  • File Formats :: JSON
  • File Formats :: JSON :: JSON Schema

PyPI version Supported Python versions Build status ReadTheDocs status pre-commit.ci status Zenodo DOI

jsonschema is an implementation of the JSON Schema specification for Python.

>>> from jsonschema import validate

>>> # A sample schema, like what we'd get from json.load()
>>> schema = {
...     "type" : "object",
...     "properties" : {
...         "price" : {"type" : "number"},
...         "name" : {"type" : "string"},
...     },
... }

>>> # If no exception is raised by validate(), the instance is valid.
>>> validate(instance={"name" : "Eggs", "price" : 34.99}, schema=schema)

>>> validate(
...     instance={"name" : "Eggs", "price" : "Invalid"}, schema=schema,
... )                                   # doctest: +IGNORE_EXCEPTION_DETAIL
Traceback (most recent call last):
    ...
ValidationError: 'Invalid' is not of type 'number'

It can also be used from the command line by installing check-jsonschema.

Features

Installation

jsonschema is available on PyPI. You can install using pip:

$ pip install jsonschema

Extras

Two extras are available when installing the package, both currently related to format validation:

  • format

  • format-nongpl

They can be used when installing in order to include additional dependencies, e.g.:

$ pip install jsonschema'[format]'

Be aware that the mere presence of these dependencies – or even the specification of format checks in a schema – do not activate format checks (as per the specification). Please read the format validation documentation for further details.

About

I’m Julian Berman.

jsonschema is on GitHub.

Get in touch, via GitHub or otherwise, if you’ve got something to contribute, it’d be most welcome!

If you feel overwhelmingly grateful, you can also sponsor me.

And for companies who appreciate jsonschema and its continued support and growth, jsonschema is also now supportable via TideLift.

Release Information

v4.24.0

  • 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.

4.24.0 May 26, 2025
4.23.0 Jul 08, 2024
4.22.0 Apr 30, 2024
4.21.1 Jan 19, 2024
4.21.0 Jan 16, 2024
4.20.0 Nov 16, 2023
4.19.2 Oct 30, 2023
4.19.1 Sep 20, 2023
4.19.0 Aug 07, 2023
4.18.6 Aug 02, 2023
4.18.5 Aug 02, 2023
4.18.4 Jul 18, 2023
4.18.3 Jul 13, 2023
4.18.2 Jul 12, 2023
4.18.1 Jul 12, 2023
4.18.0 Jul 06, 2023
4.18.0a10 Jun 12, 2023
4.18.0a9 Jun 05, 2023
4.18.0a8 May 30, 2023
4.18.0a7 May 16, 2023
4.18.0a6 Apr 27, 2023
4.18.0a5 Apr 25, 2023
4.18.0a4 Apr 17, 2023
4.18.0a3 Mar 28, 2023
4.18.0a2 Mar 20, 2023
4.18.0a1 Mar 16, 2023
4.17.3 Nov 29, 2022
4.17.1 Nov 22, 2022
4.17.0 Nov 01, 2022
4.16.0 Sep 09, 2022
4.15.0 Aug 31, 2022
4.14.0 Aug 21, 2022
4.13.0 Aug 19, 2022
4.12.1 Aug 18, 2022
4.12.0 Aug 18, 2022
4.11.0 Aug 18, 2022
4.10.3 Aug 18, 2022
4.10.2 Aug 17, 2022
4.10.1 Aug 17, 2022
4.10.0 Aug 16, 2022
4.9.1 Aug 03, 2022
4.9.0 Jul 31, 2022
4.8.0 Jul 28, 2022
4.7.2 Jul 12, 2022
4.7.1 Jul 11, 2022
4.7.0 Jul 11, 2022
4.6.2 Jul 07, 2022
4.6.1 Jun 28, 2022
4.6.0 Jun 01, 2022
4.5.1 May 05, 2022
4.5.0 May 05, 2022
4.4.0 Jan 12, 2022
4.3.3 Jan 01, 2022
4.3.2 Dec 20, 2021
4.3.1 Dec 17, 2021
4.3.0 Dec 15, 2021
4.2.1 Nov 05, 2021
4.2.0 Nov 04, 2021
4.1.2 Oct 20, 2021
4.1.1 Oct 19, 2021
4.1.0 Oct 09, 2021
4.1.0a1 Oct 09, 2021
4.0.1 Sep 30, 2021
4.0.0 Sep 29, 2021
4.0.0a6 Aug 25, 2021
4.0.0a5 Aug 24, 2021
4.0.0a4 Aug 24, 2021
4.0.0a3 Aug 20, 2021
4.0.0a2 Jul 09, 2021
4.0.0a1 May 22, 2021
3.2.0 Nov 18, 2019
3.1.1 Oct 09, 2019
3.1.0 Oct 09, 2019
3.0.2 Aug 02, 2019
3.0.1 Mar 01, 2019
3.0.0 Feb 24, 2019
3.0.0b3 Jan 27, 2019
3.0.0b2 Jan 26, 2019
3.0.0b1 Jan 21, 2019
3.0.0a6 Jan 21, 2019
3.0.0a5 Jan 15, 2019
3.0.0a4 Jan 09, 2019
3.0.0a3 Sep 30, 2018
3.0.0a2 Aug 08, 2018
3.0.0a1 Jul 17, 2018
2.6.0 Feb 05, 2017
2.5.1 Jun 08, 2015
2.5.0 Jun 05, 2015
2.4.0 Aug 19, 2014
2.3.0 Nov 03, 2013
2.2.0 Oct 18, 2013
2.1.0 Sep 22, 2013
2.0.0 May 21, 2013
1.3.0 Apr 21, 2013
1.2.0 Apr 12, 2013
1.1.0 Mar 03, 2013
1.0.0 Feb 25, 2013
0.8.0 Jan 14, 2013
0.7 Oct 29, 2012
0.6 Sep 21, 2012
0.5 Jul 17, 2012
0.4 Jun 19, 2012
0.3 Jun 06, 2012
0.2 Jan 16, 2012
0.1a0 Jan 02, 2012

Wheel compatibility matrix

Platform Python 3
any

Files in release