-
Notifications
You must be signed in to change notification settings - Fork 59
Adding Support for the JSON BigInt Parsing - Update the JSON.parse to JSONBig.parse #54
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
Comments
I believe that's happening because BigInt is outside the JSON.parse specification. This function needs to be modified to support BigInt properly:
Unfortunately, I can't work on this right now, but I'll be happy to accept a PR fixing this 🙂 |
@Kikobeats #55 Description: Problem: Solution:
This enhancement is particularly useful when dealing with:
The implementation now correctly preserves and displays high-precision numbers as intended by the backend response. |
Resolved by #55 🎉 |
https://www.npmjs.com/package/json-bigint
Having issues with showing the BigInt on the Json View. The value is getting converted to Float and then it is losing the precision for the last 3 digits making the last 3 digits as 000
{ "value" : 9223372036854775807}, for example, is still a valid RFC4627 JSON string, and in most JS runtimes the result of JSON.parse is this object: { value: 9223372036854776000 }
The text was updated successfully, but these errors were encountered: