The Encodable and Decodable protocols that were added in Swift 4 provide an easy way to convert Swift types to and from external representations like JSON.
In this talk you’ll learn how to use these protocols, and how the Codable system is designed. Ian will share with you how your app can use Codable to interact with a remote web API, and how to adapt your code if it needs to handle changes to the API in future.

Codable is also being adopted in server-side Swift. Learn how to write type-safe Swift web APIs yourself, without having to worry about HTTP content types, headers, and parsing. Easily extract the query parameters from web requests and handle them appropriately in just a few lines of code.
Ian will also mention advanced topics like writing your own Encoder or Decoder to convert to and from a custom format. Finally, we’ll look at new enhancements to Codable, coming in Swift 4.1, which will make things even simpler for app developers.

Thanks to our sponsors

Understanding Codable

Ian Partridge is a senior developer at Swift@IBM, working to bring Swift to the cloud on Linux. With a background in runtime technologies including Java garbage collection, performance and monitoring he is now working in open source on server-side Swift. Since learning Swift he has contributed to open source Foundation and libdispatch, and is also a developer of Kitura, a Swift HTTP server and web framework.

The Encodable and Decodable protocols that were added in Swift 4 provide an easy way to convert Swift types to and from external representations like JSON.
In this talk you’ll learn how to use these protocols, and how the Codable system is designed. Ian will share with you how your app can use Codable to interact with a remote web API, and how to adapt your code if it needs to handle changes to the API in future.

Codable is also being adopted in server-side Swift. Learn how to write type-safe Swift web APIs yourself, without having to worry about HTTP content types, headers, and parsing. Easily extract the query parameters from web requests and handle them appropriately in just a few lines of code.
Ian will also mention advanced topics like writing your own Encoder or Decoder to convert to and from a custom format. Finally, we’ll look at new enhancements to Codable, coming in Swift 4.1, which will make things even simpler for app developers.

Thanks to our sponsors

Understanding Codable

Ian Partridge is a senior developer at Swift@IBM, working to bring Swift to the cloud on Linux. With a background in runtime technologies including Java garbage collection, performance and monitoring he is now working in open source on server-side Swift. Since learning Swift he has contributed to open source Foundation and libdispatch, and is also a developer of Kitura, a Swift HTTP server and web framework.