Are you first timer at lazacode.org? Why not join us and start exchange your programming knowledge with everyone. Register today!

JSON - JSON string example

0 votes
3 views
added Jul 4 in API by LC Marshal Lieutenant (13,570 points)
edited Jul 12 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 by LC Marshal Lieutenant (13,570 points)
edited Jul 12 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.
...