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

Fix parsing of very large bigints #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shreyasminocha
Copy link

This is something of a follow-up to #62. It replaces the isFinite check that keeps us from being able to parse large BigInts.

I will note that this changes the behaviour for something like JSONbig.parse('{"foo":1.99+308}'). Earlier that would throw an error, but now it returns Infinity. If you want me to handle that edge case separately or have suggestions for alternatives to using a regex for the validity check, let me know.

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

Successfully merging this pull request may close these issues.

1 participant