-
Notifications
You must be signed in to change notification settings - Fork 18k
encoding/json: RawMessage should marshal without pointer receiver #6528
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
Labels
Milestone
Comments
What's the solution here? Adding a comment to http://golang.org/src/pkg/encoding/json/stream.go?s=4434:4484#L175 to warn that calling json.Marshal on a non-pointer json.RawMessage can return "meaningless" data with err == nil |
jonboulle
added a commit
to jonboulle/spec
that referenced
this issue
Mar 11, 2015
RawMessage does not marshal correctly without a pointer receiver: - golang/go#6528 - golang/go#6458 (comment) This is only a partial solution as really we should be marshalling the IsolatorValue rather than the RawMessage (since currently this will only work when marshalling Isolators that have RawMessage populated).
jonboulle
added a commit
to jonboulle/spec
that referenced
this issue
Mar 11, 2015
RawMessage does not marshal correctly without a pointer receiver: - golang/go#6528 - golang/go#6458 (comment) This is only a partial solution as really we should be marshalling the IsolatorValue rather than the RawMessage (since currently this will only work when marshalling Isolators that have RawMessage populated).
kylec1
added a commit
to dropbox/changes-client
that referenced
this issue
Oct 26, 2015
Summary: When we use debugConfig, it's nice to say what tweaks happened in the log. To avoid golang/go#6528, needed to switch to using *json.RawMessage. Test Plan: Existing unit doesn't cover it, sadly, but should be quite safe. Reviewers: nate Reviewed By: nate Subscribers: changesbot, anupc Differential Revision: https://tails.corp.dropbox.com/D147620
Dup of #14493. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: