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
if the type implements json.Marshaler, call MarshalJSON, convert result to json.RawMessage and then browse into that (requires Get() inside json.RawMessage #2)
else follow encoding/json mapping rules using struct tags to map the struct as if it was a map[string]interface{} (an easy (but inefficient) solution could call json.Marshal() and then follow Get() inside json.RawMessage #2)
Implement
Get()traversing into struct{} as requested by @lestrrat:json.Marshaler, callMarshalJSON, convert result tojson.RawMessageand then browse into that (requires Get() inside json.RawMessage #2)encoding/jsonmapping rules using struct tags to map the struct as if it was amap[string]interface{}(an easy (but inefficient) solution could calljson.Marshal()and then follow Get() inside json.RawMessage #2)