Schema module

Helper module to work with raw JSON Schema

class json_schema_validator.schema.Schema(json_obj)

JSON schema object


Enumeration of possible correct values.

Must be either None or a non-empty list of valid objects. The list must not contain duplicate elements.



JSON schema specifications says that this value SHOULD follow the EMCA 262/Perl 5 format. We cannot support this so we support python regular expressions instead. This is still valid but should be noted for clarity.

:returns None or compiled regular expression


The properties property contains schema for each property in a dictionary.

The dictionary name is the property name. The dictionary value is the schema object itself.


Return the ‘type’ property of this schema.

The return value is always a list of correct JSON types. Correct JSON types are one of the pre-defined simple types or another schema object.

List of built-in simple types: * ‘string’ * ‘number’ * ‘integer’ * ‘boolean’ * ‘object’ * ‘array’ * ‘any’ (default)