In this video, I would like to share with you a multi-page Swift Playground that I created that I use to test decoding of JSON.
You will come across JSON objects all the time and I often use it to mock data or to provide sample data in my apps.
I can store that json file in the App Bundle, in the application's Document Directory or I can use a URL to fetch the JSON.
This playground shows you how you can test decoding of JSON from all three of those sources.
If you want to support my work, you can buy me a coffee :)
https://ko-fi.com/stewartlynch
******* Download my StewartLynch YouTube Channel Application - Free **********
https://stewartlynch.gumroad.com/l/obsjz
Table of Contents:
0:00 Introduction
1:49 Decoding From Bundle
7:48 Decoding From URL
14:25 Decoding from Documents Folder
Starter Project Files:
http://www.createchsol.com/StarterPro...
Completed Project:
https://github.com/StewartLynch/Decod...
References mentioned in video:
JSON Decoding Series
• JSON and Codable Protocol - Swift
Modifying JSON
• Modifying JSON
QuickType.io
https://app.quicktype.io
Ducky Model Editor
• Ducky Model Editor for Swift Developers
JSONPlaceholder
https://jsonplaceholder.typicode.com
Other References:
Stewart Lynch's YouTube Channel:
/ stewartlynch
Stewart Lynch on Twitter:
/ stewartlynch