Photo by Pankaj Patel on Unsplash

The right way to parse JSON is to use Codable. But the problem with Codable is that if you have a nested JSON then you have to write extra Codable structs or write a custom initializer. That’s why many developers choose to use some 3rd party solution like SwiftyJSON instead.

But that is the path of defeat. Let’s fix that and combine the best parts of SwiftyJSON and Codable to make the next level JSON parsing library.

There are two ways to parse nested structs from the JSON: create extra Codable structs or create custom initializer. …

iOS Developer at Yandex

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store