Skip to content

Instantly share code, notes, and snippets.

@farzadshbfn
Last active May 4, 2020 12:42
Show Gist options
  • Save farzadshbfn/1fae5fed480f03d6fa3512401908fc42 to your computer and use it in GitHub Desktop.
Save farzadshbfn/1fae5fed480f03d6fa3512401908fc42 to your computer and use it in GitHub Desktop.
extension User {
struct Profile {
let name: String
let lastName: String
let email: Email?
let isEmailVerified: Bool
}
}
extension User.Profile: Codable {
private enum CodingKeys: String, CodingKey {
case name
case lastName = "last_name"
case email
case isEmailVerified = "is_email_verified"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment