Consider the following attempt to deserialise JSON:
I would expect my object to get deserialised from the json. Instead, I get this error message:
typeMismatch(Swift.Array<Any>, Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "localisedTexts", intValue: nil)], debugDescription: "Expected to decode Array<Any> but found a dictionary instead.", underlyingError: nil))
Here's some other things I've tried:
- Changing `let localisedTexts: Dictionary<UUID, Dictionary<String, String>>` to `let localisedTexts: Dictionary<String, Dictionary<String, String>>` deserialises my object just fine.
- Changing `UUID` to `Int` for the key (and changing the JSON correspondingly) works too.
I've attached a playground file for illustrative purpose.