AlamofireSwiftyJSON

Alamofire(4) extension for serialize Data to SwiftyJSON(3.1)

2 years after

AlamofireSwiftyJSON

Build Status Swift version Carthage compatible SwiftLint codecov.io GitHub release


Easy way to use both Alamofire and SwiftyJSON

Requirements

  • iOS 8.0+ / macOS 10.10+ / tvOS 9.0+ / watchOS 2.0+
  • Xcode 8.1+
  • Swift 3.0+

Install

  • CocoaPods
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'
use_frameworks!

target "target name" do
  pod 'AlamofireSwiftyJSON'
end
github "starboychina/AlamofireSwiftyJSON"

Usage

let URL = "http://httpbin.org/get"
Alamofire.request(URL, method: .get, parameters: ["foo": "bar"]).responseSwiftyJSON { response in
  print("###Success: \(response.result.isSuccess)")
  //now response.result.value is SwiftyJSON.JSON type
  print("###Value: \(response.result.value?["args"].array)")
}