JSON (JavaScript Object Notation)

Edit this Page

JSON is a very common data format used in web services. It is very human readable, and supported in many languages.

The following is Superman's hero information in a ruby hash and the JSON equivalent:

{
  :alias => "Superman",
  :name => "Clark Kent",
  :years_active => 60,
  :powers => ["flight", "xray_vision", "heat_vision", "invincibility"]
}

now in JSON

{
  "alias": "Superman",
  "name": "Clark Kent",
  "years_active": 60,
  "powers": ["flight", "xray_vision", "heat_vision", "invincibility"]
}