Last active
February 18, 2019 22:05
-
-
Save Kdan/60a7831c096462e2a6bd79b9ef39e6b2 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
| // CHALLENGE 1: Nested Heterogeneous Array Decoded. | |
| required init(from decoder: Decoder) throws { | |
| let container = try decoder.container(keyedBy: PersonCodingKeys.self) | |
| name = try container.decode(String.self, forKey: .name) | |
| pets = try container.decode(family: PetFamily.self, forKey: .pets) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment