Re: [JSON] What *is* JSON?

Peter Frederick Patel-Schneider wrote:
> According to http://www.json.org/
> 
> { "foo" : 3 ,
>   "foo" : 1 ,
>   "foo" : 4 ,
>   "foo" : 5 ,
>   "foo" : 9 
> }
> 
> is valid JSON.
> 
> Is this correct?  

Sadly that's valid JSON, but when JSON.parse'd it would produce an 
object as such:

{
  foo: 9
}

Since the keys of an object have to be unique.

Received on Wednesday, 23 March 2011 20:28:54 UTC