我有一个JSON模式
{
'description': 'TPNode',
'type': 'object',
'id': 'tp_node',
'properties': {
'selector': {
'type': 'string',
'required': true
},
'attributes': {
'type': 'array',
'items': {
'name': 'string',
'value': 'string'
}
},
'children': {
'type': 'array',
'items': {
'type': 'object',
'$ref': '#'
}
},
'events': {
'type': 'array',
'items': {
'type': 'object',
'properties': {
'type': {
'type': 'string'
},
'handler': {
'type': 'object'
},
'dependencies': {
'type': 'array',
'items': {
'type': 'string'
}
}
}
}
}
}
}
我要在children属性中表示的是,它是具有相同精确模式的对象数组。这是描述它的正确方法吗?
最佳答案
关于json - JSON模式-递归模式定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20752716/