[Salesforce]Json 形式

Json形式

文字列

{ "name": "Tanaka" }

数値

{
  "age": 26,
  "pi": 3.14,
  "planck_constant": 6.62607e-34
}

ヌル値

{
  "name": null
}

真偽値

{
  "active_flag": true,
  "delete_flag": false
}

オブジェクト

{
  "user_info": {
    "user_id": "A1234567",
    "user_name": "Yamada Taro"
  }
}

配列

{
  "color_list": [ "red", "green", "blue" ],
  "num_list": [ 123, 456, 789 ],
  "mix_list": [ "red", 456, null, true ],
  "array_list": [ [ 12, 23 ], [ 34, 45 ], [ 56, 67 ] ],
  "object_list": [
    { "name": "Tanaka", "age": 26 },
    { "name: "Suzuki", "age": 32 }
  ]
}

jsonデータ 例

{
  "movies": [
    {"id": 1, "name": "The Godfather", "director":"Francis Ford Coppola", "rating": 9.1},
    {"id": 2, "name": "Casablanca", "director": "Michael Curtiz", "rating": 8.8}
  ]
}
[
  {
    "id": 1,
    "name": "The Godfather",
    "director": "Francis Ford Coppola",
    "rating": 9.1
  },
  {
    "id": 2,
    "name": "Casablanca",
    "director": "Michael Curtiz",
    "rating": 8.8
  }
]