jschon is a comprehensive Python library for working with JSON data, JSON Schema validation (supporting Draft 2020-12), JSON Pointer, JSON Patch, and JSONPath. It provides robust tools for schema definition, data validation, and JSON document manipulation. The current version is 0.11.1, and the library maintains a relatively active release cadence with frequent minor and patch updates.
pip install jschonVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to define a JSON Schema, create a JSON data instance, and validate the instance against the schema using `jschon`'s `JSONSchema` and `JSON` classes.
Update calls to `Catalog.get_schema()` to explicitly pass `recursive=False` (or `True`) and `session=None` (or a valid `SchemaSession` object).
Ensure `JSONPointer` is initialized with a `jschon.URI` object. Convert strings to `URI(your_string)` first if necessary.
Directly use the `JSONSchema` object returned by `Catalog.get_schema()`. Do not rely on `JSON.schema` for schema access.
Always wrap URI strings with `jschon.URI()` before passing them to methods or constructors that expect a URI object.
Wrap the string with `jschon.URI()` before passing it. E.g., `schema = JSONSchema(schema_data, uri=URI('https://example.com/schema'))`.Retrieve schemas directly from the `Catalog` using `Catalog.get_schema()` which now returns a `JSONSchema` object directly.
Update your call to `Catalog.get_schema()` to include these arguments, e.g., `catalog.get_schema(URI('https://example.com/schema'), recursive=False, session=None)`.No dependency data recorded yet.