How do I use custom keys with Swift 4’s Decodable protocol?

Manually customising coding keys In your example, you’re getting an auto-generated conformance to Codable as all your properties also conform to Codable. This conformance automatically creates a key type that simply corresponds to the property names – which is then used in order to encode to/decode from a single keyed container. However one really neat … Read more