jsonschema icon indicating copy to clipboard operation
jsonschema copied to clipboard

An implementation of the JSON Schema specification for Python

Results 91 jsonschema issues
Sort by recently updated
recently updated
newest added

I was running some timing today and noticed it was taking longer to run the schema validation under Python 3.12 than it was under Python 3.10. 16MB SBOM generated by...

Improves `best_match` in the presence of `anyOf` / `oneOf`. Calculate the most relevant error in each separate subschema and choose the deepest one. In particular, for `anyOf` / `oneOf` keywords...

I got a bit confused about the state of type annotations for the project via the other issues. It seems that the current idea is to finish type checking this...

Resolving validation errors caused by array items defined as unique requires post-processing the result to find the dups. To illustrate, a validation of an array with 100s of items results...

Error Reporting

I have a schema that heavily utilises `$dynamicRef` to inject parts of schema from other files. Namely, here is the base schema: `base.json`: ```json { "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "base.json", "type":...

What is the supported way to check a JSON file via a (local) schema that wants to enforce the format assertions? It is already supported? My example is what https://github.com/oasis-tcs/csaf/pull/962...

In the following code PyCharm finds 1 warning and 1 error: ```python import jsonschema v: jsonschema.protocols.Validator = jsonschema.Draft202012Validator({}) # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # Expected type 'Validator', got 'Draft202012Validator' instead print(isinstance(jsonschema.Draft202012Validator({}), jsonschema.protocols.Validator)) #...

Hi, I have a question regarding the change in 4.10.0 and the default filling custom validator suggested [here](https://python-jsonschema.readthedocs.io/en/latest/faq/#why-doesn-t-my-schema-s-default-property-set-the-default-on-my-instance). Before this version, I could use this enhanced validator to fill in...

I saw strange issues while adding schemas to a project I was working on. Despite knowing I was passing a valid instance in, I was getting errors like `{} is...

Dialects v2

When looking at the way `jsonschema.exceptions.best_match` works to figure out a way to better interpret jsonschema errors, I was mislead by what I believe to be a wrong comment. https://github.com/python-jsonschema/jsonschema/blob/d47db265f4656c667035244892e7f80cce69624d/jsonschema/exceptions.py#L411-L413...