0
鑑於以下JSON對象,我該如何構建json模式? Product1,Product2和Product3是動態的「鍵」,我可以有更多類似的內容,但它們中的每一個都將具有與packageId1,packageId2,packageId3及其對應的值作爲字符串所需的鍵相同的「value」對象。基於json對象創建JSON模式
{
"Product1": {
"packageId1": "basicpackage",
"packageId2": "basicpackage",
"packageId3": "basicpackage"
},
"Product2": {
"packageId1": "newpackage",
"packageId2": "newpackage",
"packageId3": "newpackage"
},
"Product3": {
"packageId1": "thirdpackage",
"packageId2": "thirdpackage",
"packageId3": "thirdpackage"
}
}