- Xcode 10.0 or later
One of the features that I was looking forward to this year WWDC was Codable, which is just a type alias of the Encodable and Decodable protocols.
Iโve just spent a whole week shifting my Swift projects from using custom JSON parsers to Decodable(while removing a lot of code! ๐), this repository showcases what Iโve learned along the way.
In short: you can now convert a set of data from a JSON Object or Property List to an equivalent Struct/Class, basically without writing a single line of code. I demostrated it consumming a free API for weather cast and parsing all the objects using the Codable protocol