Design decisions:
BigInts and BigInt wrappers are proposed to be made serializable, and
therefore available as IndexedDB values, in
whatwg/html#3480
On 26 May 2018, at 11:47 PM, kai zhu <kaiz...@gmail.com> wrote:fyi, there was extensive discussion on whether you can JSON.stringify BigInt, in the BigInt proposal [1]. the consensus is that you cannot [2]:Here's the relevant JSON spec and here's the relevant String spec. Reading them, they say thatJSON.stringify(1234n)
throws (as discussed previously) andString(1234n)
gives"1234"
.[1] github issue - Support JSON serialisation of BigInt values #24[2] github issue - spec and README.md are unclear what serialized form of BigInt looks like using .toJSON / .toStringOn 20 May 2018, at 11:12 PM, Richard Gibson <richard...@gmail.com> wrote:That seems like a question best addressed by something like JSON Schema. ECMAScript is not unique in lacking sufficient native machinery to process JSON numbers that have no IEEE 754 64-bit representation, and similar issues exist for binary data and complex types like date/time values.
On Sunday, May 20, 2018, Anders Rundgren <anders.ru...@gmail.com> wrote:My question was really how non-ES systems preferable should "talk numbers" to ES when using JSON:_______________________________________________
https://mail.mozilla.org/pipermail/es-discuss/2018-May/050889.html
Anders
_______________________________________________
es-discuss mailing list
es-di...@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
es-discuss mailing list
es-di...@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss