Skip to content
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

not handle int64 correctly #54

Open
kjkszpj opened this issue Jun 7, 2021 · 1 comment
Open

not handle int64 correctly #54

kjkszpj opened this issue Jun 7, 2021 · 1 comment

Comments

@kjkszpj
Copy link

kjkszpj commented Jun 7, 2021

how to reproduce:

  1. write a json with int64 value
  2. sort the json
  3. seethe int64 value change

i guess it is about the accuracy problem in js

@Shapedsundew9
Copy link

Shapedsundew9 commented Mar 27, 2022

+1
Max signed 64 bit int: 2**63-1 == 9223372036854775807
If 9223372036854775807 is in the JSON file and then sorted it gets silently changed to 9223372036854776000 which would overflow.

A work around if you do not care about the full range is to use 9223372036854775000 which does not get modified.

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