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

Scientific notation for large numbers #3

Closed
vielmetti opened this issue Aug 12, 2015 · 4 comments
Closed

Scientific notation for large numbers #3

vielmetti opened this issue Aug 12, 2015 · 4 comments
Labels

Comments

@vielmetti
Copy link

The example command line is

curl -s 'http://microapi.theride.org/Location' | jp '[0].Id'

which produces this output on a recent run:

4.7268765e+07

in scientific notation, instead of simply 47268765 like I would have expected.

@jamesls
Copy link
Member

jamesls commented Aug 13, 2015

I agree that it shouldn't print the number in scientific notation, that was definitely unintentional. I think this is just how go's json encoder marshals the data. I'll get this fixed.

@jamesls jamesls added the bug label Aug 13, 2015
@flisky
Copy link
Contributor

flisky commented Nov 23, 2015

The patch has introduced an regression bug. Please take a look at PR #6.

@jamesls
Copy link
Member

jamesls commented Nov 26, 2015

Reopening as per #6

@jamesls jamesls reopened this Nov 26, 2015
@jamesls
Copy link
Member

jamesls commented Sep 29, 2021

Closing old issue, looks like this is fixed now with later versions of go.

$ echo '{"foo": 47268765}' | jp foo
47268765

@jamesls jamesls closed this as completed Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants