Skip to content

Number serialization options #736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cyberphone opened this issue May 6, 2019 · 1 comment
Closed

Number serialization options #736

cyberphone opened this issue May 6, 2019 · 1 comment

Comments

@cyberphone
Copy link

cyberphone commented May 6, 2019

Related: json-schema-org/json-schema-vocabularies#45

In many places including in IETF standards like JOSE, BigIntegers are represented not only as JSON Strings, but as specifically encoded such:
https://tools.ietf.org/html/rfc7518#section-6.3.1

This also permits hassle-free, cross-platform JSON messaging since IEEE-754 remains an issue in JavaScript.

In fact, even an int64 fails (loses data) using ECMAScript's JSON.parse() since IEEE-754 double precision only provides 53 bits of precision.

@handrews
Copy link
Contributor

handrews commented May 6, 2019

This is a duplicate of json-schema-org/json-schema-vocabularies#45. We don't need any convincing on the utility of numbers encoded as strings. As I have stated many times, we just need someone knowledgeable to step up and write a PR. If you are willing to do that, please make a note in json-schema-org/json-schema-vocabularies#45.

@handrews handrews closed this as completed May 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants