Back to Feed
Video youtube

CodingKeys: Custom Encoding & Decoding Keys | Swift 4, Xcode 9

Today, we go over how to create your very own CodingKeys / custom encoding and encoding keys with Swift 4. We are going to cover how to take whatever keys an API gives you and transform them to any property name that we want.

Encodable and Decodable made JSON parsing super easy when they were added to Swift 4. However, the magic of the Codable protocol makes it a bit harder to understand how to work with awkwardly named keys coming from APIs. We will go over how you map the server keys to your

Watch on YouTube