JSON

JSON係由 JavaScript 演變出嚟嘅一種檔案格式，常用於網絡嘅數據交流；JSON 會用人類睇得明嘅文字嚟儲同傳達包含一拃拃名-值對同陣列嘅數據物件。

好似以下噉，就係用 JSON 儲住咗一個人嘅個人資料：
{
  "firstName": "John", 
  "lastName": "Smith",
  "isAlive": true,
  "age": 27,
  "address": {
    "streetAddress": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021-3100"
  },
  "phoneNumbers": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "office",
      "number": "646 555-4567"
    }
  ],
  "children": [],
  "spouse": null
}

攷

電腦檔案格式