javascript vision thing

Richard Gibson richard.gibson at gmail.com
Wed Aug 1 03:37:53 UTC 2018


JSON is defined by ECMA-404 and RFC 8259, not by ECMA-262. An ECMAScript
JSON.parse implementation simply cannot accept e.g. 0n and still
uphold the conformance
guarantees <https://tc39.github.io/ecma262/#sec-json-object>:
>
> Conforming implementations of *JSON.parse* and *JSON.stringify* must
> support the exact interchange format described in the ECMA-404
> specification without any deletions or extensions to the format.
>

Both BigInt and Symbol lack native support in JSON, and although adding in
custom serialization is relatively easy, custom parsing is not because
JSON.parse doesn't expose the text used to produce a value. But in my
opinion, it would be a mistake to characterize that explicit lack of
support as "limbo".

On Sat, Jul 28, 2018 at 1:02 AM Anders Rundgren <
anders.rundgren.net at gmail.com> wrote:

> On 2018-07-28 00:34, Richard Gibson wrote:
> > As stated even more strongly in ECMA-404:
> >
> >     Because it is so simple, it is not expected that the JSON grammar
> will ever change. This gives JSON, as a foundational notation, tremendous
> stability.
> >
>
> Richard, that's great but it doesn't completely respond to my "limbo"
> claim:
>
> https://mail.mozilla.org/pipermail/es-discuss/2018-July/051388.html
>
> Take your pick! Whatever you come up with, I'm sure there will be some
> rotten tomatoes flying around :-)
>
> Cheers,
> Anders
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180731/7ef1cc85/attachment.html>


More information about the es-discuss mailing list