Codextended: Extension for Swift’s Codable
However, once some form of customization is needed — for example to transform parts of the decoded data, or to provide default values for certain keys — the standard
Codable
API starts to become really verbose. It also doesn’t take advantage of Swift’s robust type inference capabilities, which produces a lot of unnecessary boilerplate.That’s what Codextended aims to fix.
[…]
Codable
already comes with support for custom date formats through assigning aDateFormatter
to either aJSONEncoder
orJSONDecoder
. However, requiring each call site to be aware of the specific date formats used for each type isn’t always great — so with Codextended, it’s easy for a type itself to pick what date format it needs to use.
Previously: Even More About Swift’s Codable.