The home of JSON Schema validation right in your browser 🚧 Alpha 🚧 draft-7 only
Valid JSON:
xxxxxxxxxx
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "myschema.json",
"if": {
"type": "object",
"required": [
"common_data"
],
"properties": {
"common_data": {
"type": "object",
"required": [
"remote_os"
],
"properties": {
"remote_os": {
"const": "Linux"
}
}
}
}
},
"then": {
"type": "object",
"properties": {
"file": {
"type": "string",
"pattern": "^(.*.)(bin)$"
}
}
},
"else": {
"type": "object",
"properties": {
"file": {
"type": "string",
"pattern": "^(.*.)(exe)$"
}
}
}
}
Valid JSON:
xxxxxxxxxx
{
"common_data": {
"remote_os": "Linux"
},
"file": "abc.bin"
}
jsonschema.dev@relequestual Thanks to Sponsors: