The home of JSON Schema validation right in your browser 🚧 Alpha 🚧 draft-7 only
Valid JSON:
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "array",
"if": {
"contains": {
"required": [
"type"
],
"properties": {
"type": {
"const": "admin"
}
}
}
},
"then": {
"not": {
"contains": {
"required": [
"type",
"rights"
],
"properties": {
"type": {
"not": {
"const": "admin"
}
}
}
}
}
},
"contains": {
"type": "object",
"required": ["rights"]
},
"items": {
"type": "object",
"properties": {
"type": {
"enum": [
"guest",
"admin"
]
},
"rights": {
"type": "string"
},
"hyperLink": {
"type": "string",
"format": "uri"
}
}
}
}
Valid JSON:
[
{
"type":"admin",
"hyperLink": "http://www.someguest.com",
"rights":"all"
},
{
"type":"[not admin]",
"hyperLink": "http://www.someadmin.com",
"rights":"limited"
}
]
should be equal to one of the allowed values.
enum at "#/items/properties/type/enum"
Instance location: "/1/type"
should NOT be valid.
not at "#/then/not"
Instance location: ""
should match "then" schema.
if at "#/if"
Instance location: ""
jsonschema.dev@relequestual Thanks to Sponsors: