Unquoted keys in JSON

JavaScript lets you write {name: "Ada"}, with the key as a bare word. JSON doesn't. RFC 8259 defines each member of an object as a string, then a colon, then a value, so every key needs double quotes, even a simple one like name.

In Chrome and Node.js, JSON.parse says: Expected property name or '}' in JSON

Broken
{
  name: "Ada Lovelace",
  born: 1815
}
Fixed
{
  "name": "Ada Lovelace",
  "born": 1815
}

Fix it by hand

Put double quotes around each key: name becomes "name".

Open this example in j2n