I'm getting a JSON that looks like this:
{
looks = (
{
... look object
}
);
query = (
... array of strings
);
slices = (
(
{
... another object
}
)
);
As decoding object I'm using [String: [Look]] because I was expecting just one key (the "looks" one) but unexpectedly received the other two. Of course after decoding correctly the first wrapping key, it fails when trying to decode the "query" one because the content is not [Look]
What's the best approach for this? Ideally I would like an approach flexible enough to handle situations where other top level wrapping keys are added without making the decoding fail in the future.
Thanks!