I have a tree structure and i would like to create a JSON schema.
The class structure
class Node {
String id;
List<Node> children = new ArrayList<>();
}
The JSON Schema so far:
{
"name": "node",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The node id",
"required": true
}
"children": {
"type": "array",
"items": {
//The items of array should be node ?
}
}
}
}
My problem is that I do not know how should i describe the content "items"
of array in JSON?
Thanks in advance for answer.