You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current json.RawMessage implementation defines MarshalJSON on a pointer receiver.
This causes unexpected behavior when marshalling with non-pointer-receiver objects.
For example:
http://play.golang.org/p/Cf_6zpIKC0
Instead, MarshalJSON should be defined on a non-pointer receiver for json.RawMessage.
This will continue to work for existing code that uses pointer-receivers, but will
change behavior to work "correctly" on code that accidentally uses
non-pointer-receivers.