Validating JSON Schema DocumentsEdit online
A Valid JSON Schema document is a Well-Formed document that also conforms to the JSON meta-schema rules that defines the legal syntax of a JSON Schema document.
If a JSON document includes a meta-schema URL in the document root with the "$schema" key, the file will be validated as a JSON Schema against the specified meta-schema.
Quick Reference
- If there is a "$schema": "http://json-schema.org/draft-04/schema" property in the schema root, then Draft 4 will be used.
- If there is a "$schema": "http://json-schema.org/draft-06/schema" property in the schema root, then Draft 6 will be used.
- If there is a "$schema": "http://json-schema.org/draft-07/schema" property in the schema root, then Draft 7 will be used.
- If there is a "$schema" property in the schema root, but with a different draft value, then an error will be displayed ("no meta-schema is known with URI").
- If none of these are found, then it's validated as a simple JSON instance.
- You could also select the JSON Schema Validator in a JSON validation scenario and it will use the version specified in the JSON Schema, or if a version is not specified, the JSON Schema draft-04 will be used.
For information about how to associate a JSON schema for the purposes of validation, see Using a JSON Schema to Validate a JSON Document.