Skip to content

Instantly share code, notes, and snippets.

@Ravi61
Last active July 12, 2017 17:58
Show Gist options
  • Save Ravi61/4d68102889d63303eedfe1e803a288e7 to your computer and use it in GitHub Desktop.
Save Ravi61/4d68102889d63303eedfe1e803a288e7 to your computer and use it in GitHub Desktop.
Decoding code for
// 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