-
Notifications
You must be signed in to change notification settings - Fork 3
Enums
Brian Mullen edited this page Dec 4, 2016
·
4 revisions
Enums are automatically supported as long as they conform to RawRepresentable. There is no need to worry about adding additional protocols to your enum.
enum DayOfWeek: Int {
case sunday
case monday
case tuesday
case wednesday
case thursday
case friday
case saturday
}
let today: DayOfWeek = try json.value(for: "today")