How to exclude properties from Swift Codable?
The list of keys to encode/decode is controlled by a type called CodingKeys (note the s at the end). The compiler can synthesize this for you but can always override that. Let’s say you want to exclude the property nickname from both encoding and decoding: struct Person: Codable { var firstName: String var lastName: String … Read more