True, False and None in JSON

Python writes its constants as True, False and None. JSON's are true, false and null, and they're case-sensitive, so True isn't a JSON value at all. This usually comes from printing a Python dictionary with print() or str() instead of converting it with json.dumps(). That output also uses single quotes, which JSON doesn't allow either.

In Chrome and Node.js, JSON.parse says: Unexpected token 'T'

Broken
{
  "active": True,
  "admin": False,
  "manager": None
}
Fixed
{
  "active": true,
  "admin": false,
  "manager": null
}

Fix it by hand

Change True to true, False to false and None to null. In Python, json.dumps(data) writes real JSON.

Open this example in j2n