Skip to content
New issue

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

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

Already on GitHub? # to your account

Add support for large numbers? #86

Closed
charlieman opened this issue Aug 17, 2018 · 6 comments
Closed

Add support for large numbers? #86

charlieman opened this issue Aug 17, 2018 · 6 comments

Comments

@charlieman
Copy link

charlieman commented Aug 17, 2018

Open a json file with content like this:

{ "id": 12233344445555567 }

And JSONView shows "id": 12233344445555568

I know this might be a problem with the browser's JSON parser itself, but I wonder if JSONView could, when the number is larger than Number.MAX_SAFE_INTEGER (2^53 - 1), show it as it comes in the string.

I also found this issue in other json parsers like jq: jqlang/jq#143, they have to allow operations on the json so it's probably hard to decide what to do in their case, but JSONView is a viewer so at least showing the number the same way as the string that was parsed should be fine, right?

@mortonjohn
Copy link

mortonjohn commented Sep 3, 2018 via email

@martijns
Copy link

martijns commented Nov 3, 2018

Similarly:

[{"my_id":104301119734092424}]

Is displayed as:

my_id: 104301119734092420

@tomocrafter
Copy link

Yes, I found this problem. Please fix it

@mortonjohn
Copy link

mortonjohn commented Feb 24, 2019 via email

@gildas-lormeau
Copy link
Owner

This issue is due to the fact that the extension relies on JSON.parse to extract the JS data.

@gildas-lormeau
Copy link
Owner

This issue will be fixed in the version 0.1.17 by enabling the option "Support 64-bit signed integers".

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants