API reference

from jsontron import SPEC_VERSION, JsontronValidator, check_jsontron, extend, meta_schema
Name Description
JsontronValidator jsonschema.Draft202012Validator with rules, assert, report and let. Its check_schema also runs check_jsontron. See Building schemas.
extend(validator_class) Returns a new validator class: validator_class with the four keywords, and the tracking of the document for $root.
check_jsontron(schema) Checks the Jsontron keywords of every schema object in schema: their syntax and every jq expression. Raises jsonschema.exceptions.SchemaError for the first invalid one; on success, the compiled rule sets are cached for validation.
meta_schema() Returns the Jsontron 0.2 meta-schema, https://www.schemastore.org/jsontron-0.2.json.
SPEC_VERSION "0.2": the version of the Jsontron specification the package implements.

Errors are jsonschema's own: SchemaError for an invalid schema, ValidationError for each failure and each evaluation error. See Validation results.