Do the JSON keys have to be surrounded by quotes?

Example:
Is the following code valid against the JSON Spec?

{
    precision: "zip"
}

Or should I always use the following syntax? (And if so, why?)

{
    "precision": "zip"
}

I haven’t really found something about this in the JSON specifications. Although they use quotes around their keys in their examples.

7 Answers
7

Leave a Comment