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 large integer doubles #504

Merged
merged 2 commits into from Jul 9, 2023
Merged

Fix parsing of large integer doubles #504

merged 2 commits into from Jul 9, 2023

Conversation

lihaoyi
Copy link
Member

@lihaoyi lihaoyi commented Jul 9, 2023

Fixes #240

The basic problem appears to be that we are using a parseLong fast-path inside ujson.Value.visitFloat64StringParts. This is only valid for numbers of a certain digit-length. We should be checking for numbers larger than that length, and falling back to the toDouble slow path for those

@lihaoyi lihaoyi merged commit 1e75232 into main Jul 9, 2023
8 checks passed
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.

NumberFormatException when deserializing a 128-bit integer
1 participant