gojson icon indicating copy to clipboard operation
gojson copied to clipboard

gojson always interprets natural JSON numbers as ints.

Open e-dard opened this issue 10 years ago • 0 comments

At the moment if gojson encounters a natural JSON number it converts it into an int. This isn't always desirable, because sometimes gojson is going to encounter a resource like:

{ "foo": 2.0 }

or

[{ "foo": 2 }, {"foo": 2.3 }]

In both cases gojson will define the JSON numbers in the results type as int.

e-dard avatar Mar 26 '15 19:03 e-dard