Created
August 30, 2019 15:37
-
-
Save agiletalk/08303f83946bf61132195fe62e687981 to your computer and use it in GitHub Desktop.
This file contains 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
var pagingArrayForType = try feeds.nestedUnkeyedContainer() | |
var pagingContainer = pagingArrayForType | |
while(!pagingArrayForType.isAtEnd) { | |
let feedItem = try pagingArrayForType.nestedContainer(keyedBy: FeedKeys.self) | |
let type = try feedItem.decode(FeedType.self, forKey: .type) | |
switch type { | |
case .job: // decode job item | |
case .company: // decode company item | |
case .content: // decode content item | |
case .event: // decode event item | |
case .theme: // decode theme item | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment