What is JSON - JSON Parsing in Swift
What is JSON and how do you parse JSON in Swift? This video will show you!
JSON stands for JavaScript Object Notation and it's a way to represent data in a standard way. It helps organize that data in a way that machines can "read".
Think about how a dictionary is organized alphabetically and each entry has a word followed by a definition. There's a well defined standard which makes it easy to process the info.
The JSON data format is often used in a data feed or in the returned data from an API call.
Because the data is in a standard data format, our app can "parse" out the information from the data feed or API response.
To understand how JSON is organizes data, you need these 3 concepts:
Key-Value pairs: The key is a label and the value is the actual data. Together, a key-value pair represents one piece of information.
JSON Object: This is a collection of key-value pairs together. Often the key-value pairs are related together so that the collection (JSON object) represents a bigger piece of data. For example, the JSON Object could represent a person and the collection of key-value pairs represents the attributes of the person.
Array: An array in JSON represents a list of JSON objects or other values.
For an example of JSON data, check out the video tutorial! In the video, I also show how to parse JSON in Swift using the Codable protocol.
We take the response JSON data from a real API call and then parse it in Swift!
🚨 SPECIAL CWC+ OFFER FOR YOUTUBE:
https://cwc.to/youtubeoffer
MY FREE ONLINE COURSE:
⚡ How to make an app in 14 days - https://cwc.to/14days
CWC+ PROGRAM:
👩💻 All our courses in a learning path - https://cwc.to/plus
WEEKLY UPDATES VIA EMAIL:
✉️ Every Saturday, receive an email digest of new content - https://cwc.to/newsletter
CONNECT:
🌍 Website - https://codewithchris.com
😺 GitHub - https://github.com/codewithchris
📸 Instagram - https://www.instagram.com/codewithchris/
🐦 Twitter - https://twitter.com/codewithchris
ABOUT CODEWITHCHRIS:
Hi I’m Chris! I’m dedicated to teaching fundamentals about how to make an app. This is important if you’re trying to land an iOS job, be a freelancer, increase or start a business with an app idea. On this channel and my website, you'll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have learned to code and build apps on their own! https://cwc.to/reviews
#JSON #Parsing #CodeWithChris