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
So the example failure in this comment actually works fine in newer Go versions:
// RawJSON is a reimplementation of json.RawMessage that supports being used as a value type
//
// For example:
//
// jsonBytes, _ := json.Marshal(struct{
// RawMessage json.RawMessage
// RawJSON RawJSON
// }{
// json.RawMessage(`"Hello"`),
// RawJSON(`"World"`),
// })
//
// Results in:
//
// {"RawMessage":"IkhlbGxvIg==","RawJSON":"World"}
//
// See https://play.golang.org/p/FzhKIJP8-I for a full example.
type RawJSON []byte
The text was updated successfully, but these errors were encountered:
This was vital pre Go 1.8 but since then things have changed:
https://go.dev/doc/go1.8
So the example failure in this comment actually works fine in newer Go versions:
The text was updated successfully, but these errors were encountered: