Last active
December 21, 2019 12:06
-
-
Save hlung/f357a0a3249f1dcf165e094974e29b4a to your computer and use it in GitHub Desktop.
This file contains hidden or 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 data = """ | |
{ | |
"response": [ | |
{ | |
"name": "Kitty", | |
}, | |
{ | |
"name": "Doggy", | |
} | |
] | |
} | |
""".data(using: .utf8)! | |
struct Animal: Decodable { | |
let name: String | |
} | |
struct AnimalResponse: Decodable { | |
let response: [Animal] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment