type S struct { Age int `json:"age"` Msg []struct { Name string `json:"name"` Id string `json:"id"` } `json:"msg"` } s = new(S) err := json.Unmarshal(buf, s) 或是使用 这种模式
或是使用 这种模式