ocrd_validators.json_validator module¶
Validating JSON-Schema
-
ocrd_validators.json_validator.
extend_with_default
(validator_class)[source]¶ Add a default-setting mechanism to a
jsonschema
validation class.
-
class
ocrd_validators.json_validator.
JsonValidator
(schema, validator_class=<class 'jsonschema.validators.create.<locals>.Validator'>)[source]¶ Bases:
object
JSON Schema validator.
Construct a JsonValidator.
- Parameters
schema (dict) –
validator_class (Draft4Validator|DefaultValidatingDraft4Validator) –