math/big: big.Int JSON marshalling to/from string #36099
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
big.Int
by design marshalls / unmarshalls to a number in JSON but for actual BIG numbers this ends up with a mess in other languages, specially javascript ...Now
encoding/json
has a,string
struct tag to flag a field to be quoted as a string instead but it's restricted only forstrings, floats, integers, and booleans can be quoted.
atm.If this could also be applied to
big.Int
then we'd have a good solution for BIG numbers without breaking the existing functionality at all!related; #28154
and there's probably many more people running into this issue...
The text was updated successfully, but these errors were encountered: