Creating RestaurantDataManager

During WWDC 2017, Apple introduced a new way to parse JSON files, which is much simpler than the previous way of doing it. You implemented the old way of parsing JSON files earlier in RestaurantAPIManager. Now, you will see the new way of doing it, and this will be useful when you need to convert older projects. This also shows you that it is relatively easy to change the data manager class without making a lot of changes to the rest of your project.

To learn more about the new way of parsing JSON files, watch the video available here: https://developer.apple.com/videos/play/wwdc2017/212/.

You will start by modifying RestaurantItem so it conforms to the Decodable protocol:

  1. In the Project navigator, click

Get iOS 13 Programming for Beginners - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.