SwiftyJSON

SwiftyJSON

Language
Swift
Category
3
Version
5.0.1
Authors
Maintained by Kyle Fang, tangplin, Ruoyu Fu, Zigii Wong.
Description
SwiftyJSON makes it easy to deal with JSON data in Swift.
Install Instructions
  • Using CocoaPods is the easiest way. Modify your Podfile:
platform :ios, '8.0'
use_frameworks!
target 'MyApp' do
pod 'SwiftyJSON', '~> 4.0'
end
  • Remember to go to your terminal, navigate to your project folder and run:
$ pod install
Usage
import SwiftyJSON
let json = JSON(data: dataFromNetworking)
// Getting a string from a JSON Dictionary
let name = json["name"].stringValue
  • SwiftyJSON provides easy ways to handle many different types of JSON data, such as Dictionaries:
// If json is .Dictionary
for (key,subJson):(String, JSON) in json {
// Do something you want
}
Links