本帖最后由 KearneyKang 于 2018-1-10 15:54 编辑
您好!
首先shema需要设置,如下:
- { "definitions": {}, "$schema": "http://json-schema.org/draft-06/schema#", "$id": "http://example.com/example.json", "type": "object", "properties": { "checked": { "$id": "/properties/checked", "type": "boolean", "title": "The Checked Schema", "description": "An explanation about the purpose of this instance.", "default": false, "examples": [ false ] }, "dimensions": { "$id": "/properties/dimensions", "type": "object", "properties": { "width": { "$id": "/properties/dimensions/properties/width", "type": "integer", "title": "The Width Schema", "description": "An explanation about the purpose of this instance.", "default": 0, "examples": [ 5 ] }, "height": { "$id": "/properties/dimensions/properties/height", "type": "integer", "title": "The Height Schema", "description": "An explanation about the purpose of this instance.", "default": 0, "examples": [ 10 ] } } }, "id": { "$id": "/properties/id", "type": "integer", "title": "The Id Schema", "description": "An explanation about the purpose of this instance.", "default": 0, "examples": [ 1 ] }, "name": { "$id": "/properties/name", "type": "string", "title": "The Name Schema", "description": "An explanation about the purpose of this instance.", "default": "", "examples": [ "A green door" ] }, "price": { "$id": "/properties/price", "type": "integer", "title": "The Price Schema", "description": "An explanation about the purpose of this instance.", "default": 0, "examples": [ 15 ] }, "tags": { "$id": "/properties/tags", "type": "array", "items": { "$id": "/properties/tags/items", "type": "string", "title": "The 0 Schema", "description": "An explanation about the purpose of this instance.", "default": "", "examples": [ "home" ] } } }}
复制代码 第二步:
JSON文件在附件压缩文件
第三步:
第四步,添加数据集:
最后转换JSON的工具:
https://jsonschema.net/#/
|