JSON - JSON string example

0 votes
265 views
added Jul 4, 2018 in API by LC Marshal Captain (25,790 points)
edited Jul 12, 2018 by LC Marshal
{
    "name": "Adam",
    "age": 5,
    "address": {
        "street": "8nd Street",
        "city": "New York"
    },
    "phone": [
        {
            "type": "home",
            "number": "111 111-1111"
        },
        {
            "type": "fax",
            "number": "222 222-2222"
        }
    ]
}

1 Response

0 votes
responded Jul 4, 2018 by LC Marshal Captain (25,790 points)
edited Jul 12, 2018 by LC Marshal
//example 2
{
  "firstName": "John",
  "lastName": "Smith",
  "age": 25,
  "address": {
    "street": "21 2nd Street",
    "city": "New York",
    "state": "NY",
    "postalCode": "10021"
  },
  "phoner": [
    {
      "type": "home",
      "number": "212 555-1234"
    },
    {
      "type": "fax",
      "number": "646 555-4567"
    }
  ],
  "gender": {
    "type": "male"
  }
}
lazacode.org - Malaysia's programming knowledge sharing platform, where everyone can share their finding as reference to others.
...