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

Number as float #372

Merged
merged 2 commits into from
Feb 6, 2017
Merged

Number as float #372

merged 2 commits into from
Feb 6, 2017

Conversation

mmatczuk
Copy link
Contributor

@mmatczuk mmatczuk commented Feb 6, 2017

This PR introduces distinction between types number and integer to conform to JSON spec where number is double-precision floating-point.

See #359.

@nati nati merged commit 49c9e94 into cloudwan:master Feb 6, 2017
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This script does not relate to the original issue. Can you split this PR and add another PR with a information what this script is for?

Copy link
Contributor

@przemyslaw-dobrowolski-cl przemyslaw-dobrowolski-cl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR needs improvements

return nil, fmt.Errorf("number: unknown type %T", t)

case []uint8: // mysql
res, _ = strconv.ParseFloat(string(t), 64)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not a good idea to ignore parsing errors. At least, please log a warning.

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.

3 participants