If you've ever wondered why I think "Codable" is a terrible #Swiftlang API (despite how convenient it can be), here's a glimpse into my brain: https://forums.swift.org/t/the-future-of-serialization-deserialization-apis/78585/10
The future of serialization & deserialization APIs

I think this was by design… that Coding was meant for well-formed data. NSJSONSerialization and NSPropertyListSerialization were the more correct choice for data that was not well formed.

Swift Forums
@davedelong I don’t think it is terrible. Can we do better now with hindsight and better tools? Yes: 💯! Remember what we had before Codable? NSCoder and NSKeyedArchiver

@phausler @davedelong I think Codable is great, it’s made serialisation trivial.

I’m aware of some of the shortcomings and I wish we could discuss them without harsh judgement of the status quo 😞

@finestructure @phausler @davedelong Serialization is not trivial and Codable didn’t change that. 🤷‍♀️

@helge @finestructure @phausler @davedelong

Codable did not try to change it! What a missed opportunity…