Description
Is your feature request related to a problem? Please describe.
I would like to use number
instead of float
in my application, but most library functions do not support number
. For example, when parsing a string into a number, there is only ParseFloat
and ParseInt
available.
Describe the solution you'd like
Support number
as a return type for library functions that return float
Describe alternatives you've considered
I tried to workaround by using functions that returns a Decimal
, e.g. a: math.Pow(strconv.ParseFloat("1", 64), 1)
. This can solve the round trip problem when in doesn't fail for an exported JSON. However, if the JSON is 1.0
for the above case, it still fails. Also this is way too clunky.
Additional context
Related issue: #253 (comment)