Skip to content

Scientific notation for large numbers #3

Closed

Description

@vielmetti

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.

Activity

  1. jamesls commented on Aug 13, 2015

    @jamesls
    Member

    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.

  2. flisky commented on Nov 23, 2015

    @flisky
    Contributor

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

  3. jamesls commented on Nov 26, 2015

    @jamesls
    Member

    Reopening as per #6

  4. jamesls commented on Sep 29, 2021

    @jamesls
    Member

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

    $ echo '{"foo": 47268765}' | jp foo
    47268765
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions