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

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".

主站蜘蛛池模板: 凌海市| 鲁山县| 措美县| 探索| 永新县| 富平县| 龙海市| 辽宁省| 邵阳市| 张掖市| 汶上县| 兰坪| 中方县| 汉沽区| 娄底市| 内江市| 饶阳县| 渑池县| 观塘区| 金山区| 南安市| 稷山县| 扶余县| 东阿县| 崇阳县| 纳雍县| 余庆县| 普兰县| 兴义市| 阳山县| 百色市| 通江县| 舞钢市| 宁国市| 库伦旗| 兴海县| 松溪县| 辰溪县| 青州市| 巴林右旗| 冷水江市|