Swift 4 has introduced a new Codable protocol which replaces previous NSCoding with more type-safe data serialization and deserialization. Under the hood, Swift compiler will auto-synthesize the required code for us, and with only 1 line of code, Codable will work like a magic. But it is sometimes too magical that we should be aware of its behaviors and limitations.
In this presentation, we will look into the basics of Codable, how to write our custom implementation, and see how the magic actually takes place inside Swift compiler.
About the content
This talk was delivered live in September 2017 at try! Swift NYC. The video was recorded, produced, and transcribed by Realm, and is published here with the permission of the conference organizers.