__proto__ and JSON

Felix Böhm esdiscuss at feedic.com
Wed May 30 06:40:34 PDT 2012


2012/5/30 Brendan Eich <brendan at mozilla.com>

> David Bruant wrote:
>
>> Additionally to JSON, I'd like to ask about if decisions have been made
>> for __proto__ in object literal notation.
>>
>
> That's part of the de-facto __proto__ standard, AFAIK.
>
>
>
>> David
>>
>> Le 30/05/2012 14:07, Felix Böhm a écrit :
>>
>>> After reading that __proto__ is becoming standardized, I was wondering
>>> what the impacts on JSON would be. JSON is a subset of ECMAScript,
>>>
>>
> No, not formally. http://timelessrepo.com/json-**isnt-a-javascript-subset<http://timelessrepo.com/json-isnt-a-javascript-subset>(nit-picky but it's on target.)
>
>
>  so __proto__ would break current semantics.
>>>
>>
> How so? JSON is JSON and it won't change. The subset relation is a good
> myth. It doesn't bind JSON or JS in reality, since __proto__ is out there
> and so is JSON.
>
> /be
>

Okay, fair point. But JSON.parse should do what it's name says: Parse JSON.
Ignoring keys is not an option.

Having __proto__ as a setter would make much more sense for me, too. No
magic involved, just some functionality I don't need to care about.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120530/175ea580/attachment.html>


More information about the es-discuss mailing list