Skip to content

Instantly share code, notes, and snippets.

@feighter09
Created August 12, 2016 07:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save feighter09/3844c841310b88f5a880d3dee8b21335 to your computer and use it in GitHub Desktop.
Save feighter09/3844c841310b88f5a880d3dee8b21335 to your computer and use it in GitHub Desktop.
import SwiftyJSON
struct User {
let name: String
}
// MARK: - JSON Decodable
extension User: JSONDecodable {
init?(json: JSON)
{
guard let name = json["form"]["param"].string
else { return nil }
self.name = name
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment