嵌套
{ "$schema": "http://json-schema.org/schema#", "title": "详情页", "description": "详情页相关", "type": "object", "properties": { "pictures": { "type": "array", "title": "商品图片列表", "items": { "type": "string" }, "minItems": 3 }, "title": { "type": "string", "title": "商品标题" }, "price": { "type": "number", "title": "商品价格", "minimum": 0, "maximum": 100 }, "percentage": { "type": "number", "title": "百分比" }, "info": { "type": "string", "title": "商品介绍" }, "remmGoods": { "type": "array", "title": "推荐商品列表", "items": { "type": "object", "properties": { "title": { "type": "string", "title": "商品标题" }, "icon": { "type": "string", "title": "商品icon" }, "price": { "type": "number", "title": "商品价格", "minimum": 0, "maximum": 100 }, "percentage": { "type": "number", "title": "百分比" } } }, "minItems": 1 } } } |
Json Schema 验证器,用于验证JSON Schema和JSON Document是否一致。当有问题时,会有错误提示。
http://jsonschemalint.com/
理解 JSON Schema,学习JSON Schema很棒的教程,还有实例。
http://spacetelescope.github.io/understanding-json-schema/index.html
dream.js 是一个轻量级的 JSON 数据生成器
https://github.com/adleroliveira/dreamjs
chance.js 为JavaScript生成指定格式的随机值
http://chancejs.com/
json介绍,由两种形式组成,对象和数组。
对象:“名称/值”对的集合
数组:值的有序列表
json介绍
© admin for 可乐吧, 2016. |
Permalink |
No comment |
Add to
del.icio.us
Post tags:
您可能也喜欢: |
JSON Schema学习 |
laravel 学习 Schema 小记 |
json学习小记 |
JSON到底是什么? |
无觅 |
Feed enhanced by Better Feed from Ozh