码迷,mamicode.com
首页 > Web开发 > 详细

json schema

时间:2016-08-29 17:39:10      阅读:165      评论:0      收藏:0      [点我收藏+]

标签:

一、简介

  我们先看下面的json数据

{
    "id": 1,
    "name": "g2",
   "desc":"b2"
}

假设, 我们要求id为long型, id、name非空。desc可空。如何衡量json数据是有效的呢?现在流行的json schema 是用来校验json数据是否合法。

详情请移至 https://github.com/daveclayton/json-schema-validator

 

二、参考文献

http://json-schema.org/example1.html

json schema

标签:

原文地址:http://www.cnblogs.com/chenmo-xpw/p/5818773.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!