-
Notifications
You must be signed in to change notification settings - Fork 150
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
Format JSON changes numeric values #39
Comments
Thanks for reporting. Check release 1.32 in releases section. |
Hi, the issue does not appear to be totally fixed to me. |
This is related to a precision issue while converting string to double in the JSON parsing library. Other way is to parse the number to string. But, then it starts to show numbers inside quotes after formatting. I am trying to find out what could be done here. Let me know if anyone has a solution. |
Another example is { After "JSON Format" the value is 100000000302052990. |
yet another precision error case: lat long coordinates in plain text: [12.148681171238422,42.835353759876654] |
This is an annoying issue. Scientific values are also messed up, for example:
becomes
Is it really necessary for a formatter to convert numeric string values to anything? My (maybe naive) idea would be that a formatter should just insert some newlines and whitespace at the correct locations and be done with it. But if it's really unavoidable, would it maybe be possible to write the original string value, rather than the parsed numeric value? |
Potentially related to #78 (issue with parsing) |
I noticed that some numeric values are changed after formatting the JSON.
To reproduce:
1.Input the following text and select it
{"number":-1722.1864265316147}
2.Format text using "Plugins-JSON Viewer-Format JSON"
3.The result is
{
"number": -1722.1864265316149
}
The text was updated successfully, but these errors were encountered: