I try to Unmarshal some nested JSON in go, the structs go something along this
type GameState struct {
missiles []*Missile
others []*Player
you *Player
}
type Message struct {
gamestate *GameState
messagetype string
}
// json like {"gamestate":{...},"messagetype":"stateupdate"}
I've also put a running example online.
Now when I use map[string]interface{} to Unmarshal everything gets deserialized. But the moment I use the structs to Unmarshal I get nil back, both as result and error.
How come?