Swift Codable: Decoding / Encoding With Context

Swift Codable: Decoding / Encoding With Context

The Codable protocols are one of the coolest recent additions to Swift. Even though it works similarly to its community counterparts like Unbox, Codable has the advantage of being powered by the compiler.

One of my favorite features in Unbox was to give a context to the decoding operation. Let's take a look at how we can achieve the same with Codable.

[…]