json message code example

Example 1: javascript object notation

{
  "first_name": "Taylor",
  "last_name": "Hawkes",
  "age": 31,
  "address": {
    "street": "954 Kazaam Lane",
    "city": "Boulder",
    "state": "CO",
    "postalCode": "80303"
  },
  "emails": [
    {
      "type": "main",
      "number": "[email protected]"
    },
    {
      "type": "secondary",
      "number": "[email protected]"
    }
  ]
}

Example 2: JSON stands for

JSON = JavaScript Object Notation

Example 3: correct json type

For JSON text:

application/json

The MIME media type for JSON text is application/json. 
The default encoding is UTF-8. (Source: RFC 4627).

For JSONP (runnable javascript) with callback:

application/javascript