JOSN数据格式—JOSN是什么
JSON是什么
JSON是 JavaScript Object Notation的缩写,是一种轻量级的数据交换格式。JSON是基于JavaScript Programming Language, Standard ECMА一 262 3rd Edition 一 December 1999年一个子集。
JSON是独立于任何语言的文本格式。易于程序员阅读和编写,同时也易于计算机解析和生成。JSON的中文官网地址: http://www.json.org/json-zh.html
JSON语法规则
JSON格式的构建比较简单,主要为两种结构:
- “名称/值”对的集合( A collection of name/value pairs)。不同的语言中,它被理解为对象( object),纪录(record),结构( struct),字典( dictionary),哈希表( hash table ) ,有键列表(keyed list),或者关联数组( associative array)。
- 值的有序列表( An ordered list of values)。在大部分语言中,它被理解为数组( array)。JSON格式中作为值的类型允许是字符串( string)、数值(number) true、 false、 null、 对象(object)或者数组(