You already can't use `new` with `Symbol`, and you don't ever want to use `new` with a primitive's constructor anyways.
On Tue, Jul 17, 2018 at 10:11 AM, Anders Rundgren < [email protected]> wrote: > On 2018-07-17 17:44, Cyril Auburtin wrote: > >> It would be great to have >> ```js >> JSON.stringify({x: 5n, y: BigInt('6')}) === '{"x":5n,"y":6n}' >> JSON.parse('{"x": 3n}') // {x: 3n} >> ``` >> I don't know how feasable it would be, maybe have a new JSON5 object if >> JSON can't be changed for some reasons >> > > If compatibility with other platforms which already have addressed this > issue is an objective, there are essentially only three workable schemes: > > - Use JSON exactly as specified [*]; without restrictions on numbers. > Example: Microsoft's Json.NET. > > - Use an adaptive I-JSON scheme. Example: Oracle's JSON-B. > > - Use use a normalized I-JSON scheme. Example: Close to a de-facto > standard for systems targeting multiple platforms as well as for [probably > all] IETF standards defining JSON structures. > > Anders > > *] Ignoring footnote-like interoperability considerations for JSON numbers. > > > >> >> _______________________________________________ >> es-discuss mailing list >> [email protected] >> https://mail.mozilla.org/listinfo/es-discuss >> >> > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

