Encoding/Decoding a Swift Dictionary to/from JSON

I'm not sure what you mean, the issue I, and others as linked by itaiferber are encountering is undocumented behaviour. It's not unreasonable that a Swift Dictionary encodes as a JSON object when Dictionary.Key conforms to CodingKey which requires a String representation, but unfortunately that is not the case.

UPDATE: a great summary of the original decision