0
如果我希望數組(所有對象)的元素都遵循相同的模式,我將在JSON模式中使用哪個關鍵字?用於驗證數組內的多個相似對象的JSON模式
實施例:
"data":
[
{ //validated
"id": 1,
"name": "Bob",
"ready": "Not Ready"
},
{ //validated
"id": 2,
"name": "Steve",
"ready": "Ready"
},
{ //not validated, missing "ready"
"id": 3,
"name": "Ted"
}
]