Earlier this year I mentioned the SwiftyJSON library providing an alternative syntax for parsing JSON as using NSJSON can become overly verbose with Swift’s strict data typing.
Here’s another library for parsing JSON in Swift that takes things a step further providing many functions for turning JSON data into primitive types, class types NSDate, and NSURL called JSONHelper from Baris Sencan.
Specificially the readme states JSONHelper includes operators for:
- Deserializing JSON data into primitive types, NSData, and NSURL
- Deserializing data into an array of primitive types NSDate, or NSURL
- Deserializing data or JSON string into a class
- Deserializing data or JSON string into arrays of a class
You can find JSONHelper on Github here.
You can read more about the techniques used in JSONHelper over on the Thoughtbot blog.
A nice class for working with JSON data in Swift