【发布时间】:2019-09-19 11:58:15
【问题描述】:
我需要帮助来构建任务属性为对象类型的 JSON 模式。包含数组类型的“开发”、“审查”、“生产”和“分发”四个部门。每个部门都有重复的任务细节对象如下。
那么我该如何为这些数据定义 JSON 模式呢?
注意: 部门不应包含其他类型的数据
"taks": {
"development":[
{
"description": "",
"assigned_to":"Cortney.Brown",
"start_date": "8-28-2019",
"end_date": "9-15-2019",
"status":"wip",
"priority":"normal",
},
{
"description": "",
"assigned_to":"Renfred.Rogers",
"start_date": "8-29-2019",
"end_date": "9-10-2019",
"status":"complete",
"priority":"high",
}
],
"review": [
{
"description": "",
"assigned_to":"Herring.Myers",
"start_date": "8-30-2019",
"end_date": "9-5-2019",
"status":"OnHold",
"priority":"low",
},
{
"description": "",
"assigned_to":"Dimos.Gomez",
"start_date": "9-2-2019",
"end_date": "9-12-2019",
"status":"wip",
"priority":"normal",
}
],
"production": [
{
"description": "",
"assigned_to":"Ridge.Lopez",
"start_date": "9-5-2019",
"end_date": "9-15-2019",
"status":"wip",
"priority":"normal",
},
{
"description": "",
"assigned_to":"Keyon.Hill",
"start_date": "9-7-2019",
"end_date": "9-13-2019",
"status":"OnHold",
"priority":"low",
},
{
"description": "",
"assigned_to":"Bennett.Sanchez",
"start_date": "9-10-2019",
"end_date": "9-20-2019",
"status":"complete",
"priority":"low",
}
],
"distribution": [
{
"description": "",
"assigned_to":"Kemen.Adams",
"start_date": "9-12-2019",
"end_date": "9-20-2019",
"status":"complete",
"priority":"high",
}
]
}
【问题讨论】:
标签: json jsonschema json-schema-validator