The home of JSON Schema validation right in your browser 🚧 Alpha 🚧 draft-7 only
Valid JSON:
{ "$schema": "http://json-schema.org/draft-07/schema#", "definitions": { "containtsAsia": { "contains": { "properties": { "region": { "const": "asia" } } } }, "containsEurope": { "contains": { "properties": { "region": { "const": "europe" } } } } }, "type": "object", "properties": { "stat_data": { "type": "array", "minItems": 1, "items": { "type": "object", "properties": { "region": { "enum": [ "america", "asia", "europe" ] }, "country": { "type": "string" }, "population": { "type": "string" } } }, "oneOf": [ { "allOf": [ { "$ref": "#/definitions/containtsAsia" }, { "not": { "$ref": "#/definitions/containsEurope" } } ] }, { "allOf": [ { "$ref": "#/definitions/containsEurope" }, { "not": { "$ref": "#/definitions/containtsAsia" } } ] } ] } }}Valid JSON:
{ "stat_data": [{ "region": "america", "country": "USA", "states": "50" }, { "region": "asia", "country": "Japan", "details":{ "language":"Japanese", "tz": "utc+9.00" } }, { "region": "europe", "country": "finland", "language":"Finnish" } ]}jsonschema.dev@relequestual Thanks to Sponsors: ![]()