Codable and Polymorphism

Codable is a great API, but sometimes real APIs can be tricky to model. In this episode we’ll examine a real use case of an API that returns a collection of elements, each of them similar but specified by a type. We’ll leverage Codable and inheritance to create a representation of this structure and show how you can peek into the container in order to determine what type to decode.

This is a companion discussion topic for the original entry at