Pseudo-JSON with unquoted property names

Dion Almaer dion at
Fri Jun 5 14:17:20 PDT 2009

There key here being that 'class' is a keyword.

Personally having to quote things is frustrating if you think of JSON as not
a data format but something that developers tinker with. I am always getting
JSON "wrong" while I tinker in development, especially when an eval() is
around at some point and it works. It is a subtle developer ergonomic issue
vs. the safety that you get. I tend to be loose and am probably wrong on
this one.

On Fri, Jun 5, 2009 at 2:14 PM, Mike Shaver <mike.shaver at> wrote:

> On Fri, Jun 5, 2009 at 4:57 PM, John Cowan <cowan at> wrote:
> > However, { "class": "sophomore" } is valid ES3, whereas { class:
> "sophomore" } is not.
> Really?  I was pretty sure that ES3 permitted naked strings as
> property names in object initializers, but I'll admit I'm not going to
> walk through the grammar right now to be sure.
> Mike
> _______________________________________________
> es5-discuss mailing list
> es5-discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es5-discuss mailing list