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
- An Open Source Library That Makes Working With JSON Data Using Swift Much Easier
- Open Source iOS Library Providing Easy NSObject To JSON/XML Serialization and Conversion To Parse PFObject
- Open Source Swift Library Simplifying Use Of NSURLSession
- Tutorial: Fetching And Parsing JSON And XML With Simple Reusable Classes
- Tool: A Command Line Documentation Generator For Swift
Original article: Open Source Swift Library Providing Easy JSON Deserialization Into Classes, Primitives And More
©2014 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.