Crockford talking about his experience with js, somewhere towards the
middle he talks about inventing JSON (the language implementation, not
the concept) and his discovery of the issue of reserved words in
object literals:

http://video.yahoo.com/video/play?ei=UTF-8&gid=133414&vid=630959&b=1

It may be this video or his four part series on js, can't tell because
Yahoo video won't let me  jump ahead.

- jake

On 6/18/07, Mike Alsup <[EMAIL PROTECTED]> wrote:

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