json定义

JSON is built on two structures:

  • A collection of name/value pairs. In various languages, this is realized as an object, record, struct, dictionary, hash table, keyed list, or associative array.
  • An ordered list of values. In most languages, this is realized as an array, vector, list, or sequence.

JSON结构的两种定义:对象、数组

根据JSON的字面含义

JSON (JavaScript Object Notation) is a lightweight data-interchange format.

一直认为object才叫做json,是key,value 键值对的对象形式才算,昨天和同事沟通数据接口发现这块存在歧义,事实证明我的理解是存在误区的; 

arry 也同样可以序列化为json,展示形式不一样,如上官方描述,两种数据结构,key/val 键值对和有序序列; 

 

posted on 2019-01-30 09:44  iokde.com  阅读(109)  评论(0编辑  收藏  举报

导航