Skip to content

Instantly share code, notes, and snippets.

@idevaj
idevaj / Post.swift
Created January 25, 2016 04:13 — forked from cmoulton/ResponseJSONObjectSerializable.swift
Demo code for Strongly-Typed GET and POST Calls With Alamofire at https://grokswift.com/strongly-typed-api-calls/. Uses Swift 2.0, SwiftyJSON 2.3.0, and Alamofire 3.0.
import Foundation
import Alamofire
import SwiftyJSON
public protocol ResponseJSONObjectSerializable {
init?(json: SwiftyJSON.JSON)
}
public protocol ResponseJSONCollectionSerializable {
static func collection(json: SwiftyJSON.JSON) -> [Self]

Videos