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.Rat has not Marshall/Unmarshall methods #7287

Closed
gopherbot opened this issue Feb 8, 2014 · 3 comments
Closed

math/big: big.Rat has not Marshall/Unmarshall methods #7287

gopherbot opened this issue Feb 8, 2014 · 3 comments

Comments

@gopherbot
Copy link

by skurtsev:

It seems that no Marshal/Unmarshal methods available for big.Rat whilst big.Int has
proper methods. E.g. marshaling big.Rat inside struct results in empty value for big.Rat
fields: see INVALID_RAT in json output at http://play.golang.org/p/M_IgJUGSpo

What steps will reproduce the problem?
1. Create big.Rat var inside another struct
2. Call json.Marshall for the struct
3.

What is the expected output?
big.Rat must be serialized to json (unserialized from json)

What do you see instead?
Empty {} instead of big.Rat's serialized value

Which operating system are you using?
Linux localhost 3.12.9-301.fc20.i686+PAE #1 SMP Wed Jan 29 16:12:24 UTC 2014 i686 i686
i386 GNU/Linux


Which version are you using?  (run 'go version')
go version go1.2 linux/386

Please provide any additional information below.
@ianlancetaylor
Copy link
Contributor

Comment 1:

Issue #7290 has been merged into this issue.

@griesemer
Copy link
Contributor

Comment 3:

https://golang.org/cl/61180043/

Status changed to Started.

@griesemer
Copy link
Contributor

Comment 4:

This issue was closed by revision eea28f6.

Status changed to Fixed.

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants