slightly off-topic, but this would be relevant for nodejs database-driver 
authors contemplating BigInt support.

here's the the tentative roadmap for indexeddb support for bigint [1]:

Design decisions:

BigInts compare greater than Number and less than everything else
No type coercion between BigInt and Number; they are simply
distinct, unrelated keys, even if mathematically equal
No BigInt autoIncrement support--53 bits should be enough for anyone
BigInts and BigInt wrappers are proposed to be made serializable, and
therefore available as IndexedDB values, in
whatwg/html#3480 <https://github.com/whatwg/html/pull/3480>
Addresses #230 <https://github.com/w3c/IndexedDB/issues/230>


[1] github pull-request - Allow BigInts as IndexedDB keys #231
https://github.com/w3c/IndexedDB/pull/231 
<https://github.com/w3c/IndexedDB/pull/231>




> On 26 May 2018, at 11:47 PM, kai zhu <kaizhu...@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 <https://tc39.github.io/proposal-bigint/#sec-serializejsonproperty> 
> the relevant JSON spec and here's 
> <https://tc39.github.io/proposal-bigint/#sec-tostring-applied-to-the-bigint-type>
>  the relevant String spec. Reading them, they say that JSON.stringify(1234n) 
> throws (as discussed previously 
> <https://github.com/tc39/proposal-bigint/issues/24>) and String(1234n) gives 
> "1234".
> 
> 
> 
> [1] github issue - Support JSON serialisation of BigInt values #24
> https://github.com/tc39/proposal-bigint/issues/24#issuecomment-290200829 
> <https://github.com/tc39/proposal-bigint/issues/24#issuecomment-290200829>
> 
> [2] github issue - spec and README.md are unclear what serialized form of 
> BigInt looks like using .toJSON / .toString
> https://github.com/tc39/proposal-bigint/issues/124 
> <https://github.com/tc39/proposal-bigint/issues/124>
> 
> kai zhu
> kaizhu...@gmail.com <mailto:kaizhu...@gmail.com>
> 
> 
> 
>> On 20 May 2018, at 11:12 PM, Richard Gibson <richard.gib...@gmail.com 
>> <mailto:richard.gib...@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.rundgren....@gmail.com 
>> <mailto:anders.rundgren....@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 
>> <https://mail.mozilla.org/pipermail/es-discuss/2018-May/050889.html>
>> 
>> Anders
>> _______________________________________________
>> es-discuss mailing list
>> es-disc...@mozilla.org <mailto:es-disc...@mozilla.org>
>> https://mail.mozilla.org/listinfo/es-discuss 
>> <https://mail.mozilla.org/listinfo/es-discuss>
>> _______________________________________________
>> es-discuss mailing list
>> es-disc...@mozilla.org <mailto:es-disc...@mozilla.org>
>> https://mail.mozilla.org/listinfo/es-discuss
> 

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
To post to this group, send email to nodejs@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/12CB7E32-7553-4CFD-886A-A242E7CE9E4F%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to