Pseudo-JSON with unquoted property names

Mike Shaver mike.shaver at gmail.com
Fri Jun 5 14:18:15 PDT 2009


On Fri, Jun 5, 2009 at 5:14 PM, Mike Shaver <mike.shaver at gmail.com> wrote:
> On Fri, Jun 5, 2009 at 4:57 PM, John Cowan <cowan at ccil.org> 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.

Missed the significance of "class" there as a reserved word, sorry for
the noise.

Mike


More information about the es5-discuss mailing list