Decoding JSON with Codable
Map JSON into Swift model structs.
Why JSON Needs Decoding
APIs speak JSON, a text format Swift cannot use directly. You decode that text into real Swift types you can work with. 📦
Meet Codable
The Codable protocol lets a type convert itself to and from JSON automatically, so you rarely write parsing code by hand.
All lessons in this course
- Decoding JSON with Codable
- Calling APIs with URLSession
- The .task Modifier
- Loading & Error States