Swift 4\'s new Encodable
/Decodable
protocols make JSON (de)serialization quite pleasant. However, I have not yet found a way to have fine-grained c
If we need to exclude decoding of a couple of properties from a large set of properties in the structure, declare them as optional properties. Code to unwrapping optionals is less than writing a lot of keys under CodingKey enum.
I would recommend using extensions to add computed instance properties and computed type properties. It separates codable comforming properties from other logic hence provides better readability.