Interesting.  That makes sense.  Thanks for the info, Jake!


Just saw a video on why this is by Douglass Crockford....

Technically, you can use unquoted labels ala {var1:"value1"}, but
JavaScript will have errors when you try to use reserved words like
"for" and "switch".

Rather than write the JSON standard for labels using:

Attribute names can be unquoted as long as they are not these words:
for, which, ...

Crockford decided to just require that labels in object literals must
always be quoted.

Reply via email to