3 JSON From local file - Swift

Опубликовано: 09 Февраль 2020
на канале: Stewart Lynch
9,230
353

I this video we will see how we can get the contents of a file that is part of the Bundle of application and, if it is JSON, parse using our Decodable protocol.

We will be safer in our implementation this time around using guard statements in case we have errors and need to crash out.

Series Resources:
Videos 1 - 8 all use the same Xcode Playground.
Download - http://www.createchsol.com/JSONParsin...
Video 9 Starter Projects
Download - http://www.createchsol.com/JSONParsin...

Video References:
JSON Formatter and Validator:
https://jsonformatter.curiousconcept.com

All Videos in this series

1. Introduction to JSON and Codable with Swift
https://www.avanderlee.com/swift/json...

2. The Basics of JSON Decoding - Swift
   • 2  The Basics of JSON Decoding - Swift  

3. Getting JSON from a local file - Swift
   • 3  JSON From local file - Swift  

4. JSON - Decoding Dates - Swift Codable
   • 4.  JSON - Decoding Dates - Swift Cod...  

5. JSON CodingKeys - Swift
   • 5. JSON CodingKeys - Swift  

6. JSON - Custom CodingKeys- Swift
   • 6.  JSON - Custom CodingKeys- Swift  

7. JSON from API - Swift
   • 7.  JSON from API - Swift  

8. Encoding Data - Swift
   • 8.  Encoding data - Swift  

9. Decode/Encode Sample Application - Swift
   • 9.  Decode/Encode Sample App - Swift  

Stewart Lynch Links:

YouTube Playlist on iOS Development
   • Swift and SwiftUI Fundamentals  

Stewart Lynch’s CreaTECH Solutions Web Site
https://www.createchsol.com

Stewart Lynch's GitHub
https://github.com/StewartLynch

Stewart Lynch on Twitter
  / stewartlynch