One of the most exciting announcements coming from this year’s WWDC is the new Combine framework. Combine provides a declarative Swift API for processing values over time, similar to other frameworks such as RxSwift, which means
Functional Reactive Programming now becomes a first-party paradigm in the iOS world!
This article is the second part of my previous article Codable by Example. This time we’ll be covering a few more scenarios when decoding JSON payloads into Swift types.
Introduced in Swift 4, Codable is a versatile mechanism allowing the conversion to and from external data representations, such as JSON payloads, Property Lists, etc.
If you look at the declaration of Codable you’ll see it is a simple typealias for two protocols: Decodable and Encodable.