Shortcuts module¶
One liners that make the code shorter
-
json_schema_validator.shortcuts.validate(schema_text, data_text)¶ Validate specified JSON text (data_text) with specified schema (schema text). Both are converted to JSON objects with
simplesjon.loads().Parameters: Returns: Same as
json_schema_validator.validator.Validator.validate()Raises: Whatever may be raised by simplejson (in particular
simplejson.decoder.JSONDecoderError, a subclass ofValueError)Raises: Whatever may be raised by
json_schema_validator.validator.Validator.validate(). In particularjson_schema_validator.errors.ValidationErrorandjson_schema_validator.errors.SchemaError