Created
August 12, 2016 07:29
-
-
Save feighter09/3844c841310b88f5a880d3dee8b21335 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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