Created
July 27, 2019 17:35
-
-
Save rintoandrews90/390e59ff1d9b5cbefb08b0760b9e4dc2 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 decoder = JSONDecoder() | |
let model = try? decoder.decode(User.self, from:jsonData) | |
struct Name: Codable { | |
var firstname: String | |
var lastname: String | |
} | |
struct User: Codable { | |
var userId: String | |
var jobTitleName: String | |
var name: Name | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment