I am probably doing something wrong when serializing/deserializaing structures w/ JSON. When asserting the interface after JSON deserilization:
AData2 = anInterface.(Data)
At runtime go is expecting a map[string]interface but the object is of type Data:
type Data struct {
Content string
Links []string
}
It throws the error:
panic: interface conversion: interface {} is map[string]interface {}, not main.Data
Full code at https://play.golang.org/p/jm3_ut3R56n
Thanks in advance for any hint.