The example linked and described already deals with deserializing json arrays. What trouble exactly are you experiencing?
Most JSON arrays come in the form
{
"objects": [{"foo": "bar"}, ...]
}
Instead of `[{"foo": "bar"}, ...]`. So I need to create a temporary struct, it would've been nice to be able to provide a starting point or similar. Like `json.UnmarshalFrom(data, &foos, "objects")` (hmm, this gave me an idea!).Another example is this:
type Address struct {
street string
city string
}
And I want to parse that populate that struct with the data from {
"name": "John Doe",
"address": {
"street": "Some street 1",
"city": "Footown"
},
...
}
Again I have to use temporary struct.