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

Ability to correctly distinguish float from int #2398

Merged
merged 1 commit into from
May 18, 2018
Merged

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented May 18, 2018

With JSON mutations, we previously couldn't distinguish an int from float, using the standard json.Unmarshal. Now, we use a json.Decoder, with UseNumber, which allows us to correctly distinguish int from float.

This fixes #2377 and #2378 .


This change is Reviewable

@manishrjain manishrjain merged commit 9d0022e into master May 18, 2018
@manishrjain manishrjain deleted the mrjn/json.number branch May 18, 2018 00:48
manishrjain added a commit that referenced this pull request May 18, 2018
With JSON mutations, we previously couldn't distinguish an int from float, using the standard json.Unmarshal. Now, we use a json.Decoder, with `UseNumber`, which allows us to correctly distinguish int from float.

This fixes #2377 and #2378 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Inferred schemas treat integers as floats, may silently alter data
1 participant