小编Joh*_*ton的帖子

具有嵌套对象的 JSON 模式

我正在尝试使用dojox JSON 模式验证器验证一些 JSON 对象 but I am new to this sort of thing and I can't get my schema right. I'm mostly trying to make sure that there aren't any missing fields in my objects.

基本上,我有一个对象,它有两个字段,称为类型和描述。该对象还可以有一个属性字段,其中包含任意数量的附加对象字段。如果有帮助的话,我在下面放了一些语法表示

参数:类型描述[属性]

属性:参数+

我的对象的示例如下所示:

{
        "type": "object",
        "description": "The point of interest location description.",
        "properties": {
            "pageIndex": {
                "type": "number",
                "description": "The page index to view"
            },
            "points": {
                "description": "Used if viewState.zoomWidth is true; specifies 4 corners of the rectangle to make …
Run Code Online (Sandbox Code Playgroud)

dojo json

7
推荐指数
0
解决办法
2万
查看次数

标签 统计

dojo ×1

json ×1