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

math/big: big.Int JSON marshalling to/from string #36099

Open
rubensayshi opened this issue Dec 12, 2019 · 2 comments
Open

math/big: big.Int JSON marshalling to/from string #36099

rubensayshi opened this issue Dec 12, 2019 · 2 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@rubensayshi
Copy link

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 for strings, 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...

@ALTree ALTree added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Dec 12, 2019
@ALTree ALTree added this to the Unplanned milestone Dec 12, 2019
@AlexanderYastrebov
Copy link
Contributor

Somewhat related to #34472

@odeke-em
Copy link
Member

Thanks for the patience everyone over the years and thanks for the feature request! So this feature request came up before the proposal requirements were strong, thus perhaps let's convert this into a quick and simple proposal and then we can have a go ahead for it @rubensayshi!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants