Last active
July 12, 2017 17:58
-
-
Save Ravi61/4d68102889d63303eedfe1e803a288e7 to your computer and use it in GitHub Desktop.
Decoding code for
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
// let jsonData = Person JSON | |
let decoder = JSONDecoder() | |
do { | |
let model = try decoder.decode(Person.self, from: jsonData) | |
print(model) | |
} catch { | |
print("Error parsing JSON") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment