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

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

主站蜘蛛池模板: 乌鲁木齐县| 四子王旗| 兰考县| 同心县| 德阳市| 嘉兴市| 山丹县| 霍山县| 宝兴县| 白沙| 朝阳县| 双峰县| 宾川县| 和硕县| 台安县| 彭泽县| 岳阳市| 区。| 广平县| 南充市| 永胜县| 博客| 揭西县| 兴宁市| 镇巴县| 亳州市| 芦山县| 平邑县| 溧阳市| 福清市| 利津县| 孟州市| 呼伦贝尔市| 来安县| 禄劝| 金门县| 沧州市| 开化县| 县级市| 余江县| 长丰县|