What version of Go are you using (go version)?
What operating system and processor architecture are you using (go env)?
What did you do?
json.Unmarshal refuses to deserialise JSON into a custom interface var, even though the var (interface) points to a concrete object.
What did you expect to see?
json.Unmarshal should be able to inspect the concrete object behind custom interface to deserialise JSON, instead of throwing message "cannot unmarshal object into Go value of type "
@HouzuoGuo pointer to interface of value is not equivalent to interface of
pointer, and only interface of pointer is sufficient. Interfaces do not
extend addressability to their contents like other kinds of values do, so
even though, with the pointer, the interface value itself is now
addressable, the boxed value is still a semantic copy of what you actually
want to modify.