官术网_书友最值得收藏!

JSON

JavaScript Object Notation (JSON) is the standard syntax used when dealing with data in JavaScript as well as most other languages and web services. The basic premise of JSON is that it looks exactly like a standard JavaScript object with a few strict exceptions:

  • JSON is pure text. There are no data types with properties; that is, date values are stored as strings and so on
  • All names and string values must be in double quotes
  • There can be no functions as properties

Let's take a quick look at a pretty standard JSON object:

{ 
  "title": "This is the title", 
  "description": "Here is where the description would be", 
  "page-count": 150, 
  "authors": [ 
    { "name": "John Smith" }, 
    { "name": "Jane Doe" }, 
    { "name": "Andrea Johnson" } 
  ], 
  "id": "1234-567-89012345" 
} 

If you are at all familiar with XML, JSON is somewhat similar, except it is much easier to read and make sense out of. As described best by the ECMA, "JSON is a text format that facilitates structured data interchange between all programming languages".

主站蜘蛛池模板: 鄢陵县| 昌黎县| 漳平市| 梨树县| 南华县| 穆棱市| 湖北省| 射洪县| 申扎县| 施甸县| 商洛市| 民勤县| 沾益县| 全椒县| 育儿| 剑川县| 新绛县| 米林县| 望谟县| 新沂市| 大渡口区| 万安县| 望都县| 于都县| 瓮安县| 保定市| 南汇区| 尼玛县| 乐至县| 庆阳市| 平乡县| 大同县| 焉耆| 砚山县| 台北市| 宁夏| 玉溪市| 开封县| 定日县| 吕梁市| 深水埗区|