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

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

主站蜘蛛池模板: 新民市| 雷波县| 农安县| 余姚市| 彰武县| 和平县| 峡江县| 深泽县| 江油市| 锦州市| 砀山县| 江孜县| 海门市| 剑河县| 娱乐| 上高县| 丰原市| 佛山市| 延川县| 固阳县| 新乐市| 凌海市| 沽源县| 太谷县| 将乐县| 儋州市| 洛川县| 丘北县| 洛扎县| 阿拉善右旗| 嘉义县| 仁怀市| 大埔县| 通许县| 黑龙江省| 桃园县| 新津县| 兰西县| 会宁县| 新安县| 吉木萨尔县|