Created
September 17, 2016 18:27
-
-
Save anonymous/315a869a890a39f263fb5c37cc746480 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
guard let json = jsonOptional as? Dictionary<String, AnyObject>, | |
id = json["id"] as AnyObject? as? Int, | |
name = json["name"] as AnyObject? as? String, | |
email = json["email"] as AnyObject? as? String | |
else { return } | |
let user = User(id: id, name: name, email: email) | |
callback(user) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment