Last active
July 27, 2020 17:00
-
-
Save giovani-pereira-ifood/4843fd285a42a9155dd99ace31864ec3 to your computer and use it in GitHub Desktop.
User codable struct with favorite color field
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
struct User: Codable { | |
let name: String | |
let color: Color | |
enum Color: String, Codable { | |
case red = "RED" | |
case yelllow = "YELLOW" | |
case blue = "BLUE" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment