Time to abandon SwiftyJSON and use JSONDecoder
1. JSON Parsing Is Part of the Foundation

Photo by Mirko Blicke on Unsplash.

There are handfuls of well-known projects dealing with JSON parsing employing various approaches and philosophies. SwiftyJSON is probably the earliest and most popular one among them. It’s less verbose and error-prone and leverages Swift’s powerful type system to handle all of the details.

JSONSerialization is the core of most JSON parsing projects. It comes from Swift’s Foundation framework and converts JSON into different Swift data types. People used raw JSONSerialization to parse JSON objects before projects like SwiftyJSON came up. But it can be painful, as the value type and JSON structure may vary. You need to manually handle errors and cast the type Any to Swift foundation types. It’s more error-prone.
['Eric Yang']
['Technology', 'iOS', 'Xcode', 'Swift', 'Programming']