Normally in Go, I would use the following struct:
type Inner Struct {
Key1 string `json:"Key1"`
Key2 int32 `json:"Key2"`
}
type Outer struct {
Outer []Outer `json:"Outer"`
}
To Decode the following JSON into:
{"Outer":[{"Key1":"Value1", "Key2":2}, ...]}
I’m unable to figure out what struct to use for the following JSON:
[{"Key1":"Value1", "Key2":2}, ...]
Due to the fact that I have no JSON key for the outer object. How do you handle this situation?