Sets plus JSON

Rick Waldron waldron.rick at gmail.com
Thu Oct 4 17:32:03 PDT 2012


On Thu, Oct 4, 2012 at 8:16 PM, Brendan Eich <brendan at mozilla.org> wrote:

> Nicholas C. Zakas wrote:
>
>> I agree, I'm not sure there is a rational default for Map, but I think
>> there is one for Set as an array (and it seems like most people agreed).
>>
>
> As with Set, I claim the default JSON for Map should be
>
>   [[key1, value1], ~~~ [keyN, valueN]]
>


I'm still curious about my question from yesterday; instead of repasting, I
put it in a gist:

https://gist.github.com/3837337


Rick



>
> with ~~~ as meta-ellipsis.
>
> This is not a round-tripping seralization, any more than
>
>   [elt1, ~~~ eltN]
>
> is for Set. It simply is the normal form expected by the Map constructor.
> That wins.
>
> /be
>
> ______________________________**_________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/**listinfo/es-discuss<https://mail.mozilla.org/listinfo/es-discuss>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20121004/2d6e8043/attachment-0001.html>


More information about the es-discuss mailing list