View source code

An online, interactive JSON Schema validator. Supports JSON Schema Draft 3, Draft 4, Draft 6, Draft 7, Draft 2019-09 and Draft 2020-12.


27
 
1
{
2
    "$defs": {
3
        "RecursiveModel": {
4
            "additionalProperties": false,
5
            "properties": {
6
                "value": {
7
                    "description": "A string",
8
                    "type": "string"
9
                },
10
                "children": {
11
                    "description": "Children with strings",
12
                    "items": {
13
                        "$ref": "#/$defs/RecursiveModel"
14
                    },
15
                    "type": "array"
16
                }
17
            },
18
            "required": [
19
                "value",
20
                "children"
21
            ],
22
            "title": "RecursiveModel",
23
            "type": "object"
24
        }
25
    },
26
    "$ref": "#/$defs/RecursiveModel"
27
}
7
 
1
{
2
    "value": "a",
3
    "children": [{
4
      "value": "b",
5
      "children": [],
6
    }]
7
}