There are just a few rules that you need to remember:
•Objects are encapsulated within opening and closing brackets { }
•An empty object can be represented by { }
•Arrays are encapsulated within opening and closing square brackets [ ]
•An empty array can be represented by [ ]
•A member is represented by a key-value pair
•The key of a member should be contained in double quotes. (JavaScript does not require this. JavaScript and some parsers will tolerate single-quotes)
•Each member should have a unique key within an object structure
•The value of a member must be contained in double quotes if it's a string (JavaScript and some parsers will tolerates single-quotes)
•Boolean values are represented using the true or false literals in lower case
•Number values are represented using double-precision floating-point format. Scientific notation is supported
•Numbers should not have leading zeroes
•"Offensive"" characters in a string need to be escaped using the backslash character
•Null values are represented by the null literal in lower case
•Other object types, such as dates, are not properly supported and should be converted to strings. It becomes the responsability of the parser/client to manage this.
•Each member of an object or each array value must be followed by a comma if it's not the last one
•The common extension for json files is '.json'
•The mime type for json files is 'application/json'
例子:
{ "anObject": { "numericProperty": -122, "stringProperty": "An offensive \" is problematic", "nullProperty": null, "booleanProperty": true, "dateProperty": "2011-09-23" }, "arrayOfObjects": [ { "item": 1 }, { "item": 2 }, { "item": 3 } ], "arrayOfIntegers": [ 1, 2, 3, 4, 5 ] }
在线JSON转换及格式化网址: http://www.freeformatter.com/json-formatter.html
相关推荐
Json格式的数据阅读性很差,如果数据量大的话再阅读方面会十分困难,有了这软件,问题就解决了,能够快速把Json字符串排列规则的树结构,支持对JSON字符串进行格式化显示,支持粘贴数据并进行可视化展示以及自动格式...
Mac版json格式化工具Mac版json格式化工具Mac版json格式化工具Mac版json格式化工具
Flume二次开发,支持抽取MYSQL Oracle数据库数据 以JSON格式推送至Kafka。 demo: sql_json.sources.sql_source.type = com.hbn.rdb.source.SQLSource sql_json.sources.sql_source.connectionurl = jdbc:oracle:...
C# json格式转换,Json格式字符串与C#对象相互转换,类库和测试demo 写了一个json与C#对象相互装换的类库,直接调用就行,有测试案例,代码注释非常详细 部分方法: /// 将Json字符串解析为C#中的对象 /// Json格式...
json格式化工具,json
无需安装,直接运行,将json格式的数据,复制粘贴到里面,点击Format工具,就自动格式化,如果json格式有问题,也会报红线,给提示。
要素合集创建要素图层的方式,需要用到json格式的要素,为了方便本地测试,我们可以把geojson和shp格式的要素转换为json格式。
好用的本地json格式化小工具,无需联网非常好用的本地json格式化工具,在内网的朋友就不用在上网去格式化了。可格式化,可压缩,极度推荐。
javascript-json校验模块 支持 1.json字符串格式化 2.json格式错误报错3.错误所在行标出4.直接放在iframe或者模块里面就可以使用
Chrome浏览器JSON格式化插件可以直接拖拽安装,自动格式化,带自动分层可折叠展开,非常好用
英汉汉英词库 json格式
JSON格式化,可以折叠展开树进行查看,桌面小软件,不需要联网,挺好用的哈
json格式化工具,
jQuery JSONView是一款非常实用的格式化和语法高亮JSON格式数据查看器jQuery插件。通过该插件可以将JSON格式的数据进行格式输出,便于阅读,同时它还支持各种数据类型的语法高亮,以及节点的收缩和展开等。
JSON格式化和编辑工具。可以以方便查看json字符串格式化为可视化结构视图
json格式与java类对象相互转换。json格式转换成java类对象,List,Map。类对象转换成json。
绿色版JSON格式化工具,解压后直接可以使用,打开JsonView.exe的执行文件即可。对于前端和后端开发人员来说是一款不错的工具!
json格式化工具,支持json格式化,xml转换为json,map类型转换为json等。
google浏览器插件,json格式化显示工具及安装方法
提供两种浏览器json格式化插件,一个是JSON-Handle,一个是JSONView,两个都比较好用,你可以任选一个