Advertisement

What is JSON - JSON Parsing in Swift

What is JSON - JSON Parsing in Swift What is JSON and how do you parse JSON in Swift? This video will show you! (This video is sponsored by Atlantic.net. 1 Year Free Hosting: Use code CHRIS for an additional $25!)


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!

CodeWithChris Resource links:

Get a customized roadmap for your app and start building it in 7 days:


My Courses and Training:
📚

ALL my recording equipment and recommended books:
📚

To continue learning how to make apps with us, be sure to subscribe to our channel:


And we also have a thriving Facebook community where you can meet like-minded iOS learners and get support on your own iOS app development journey!


My guide for Xcode on Windows:


For more tutorials on how to build iPhone apps, make sure you subscribe and visit my site where you'll find a community of like-minded learners! Learning something new is always more fun with other people!

⚡Website:
⚡Instagram:
⚡Twitter:

CodeWithChris is dedicated to teaching beginners and non-programmers all about how to make an app. On the site, you'll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have successfully picked up Swift, Xcode and app building from my course and materials!

Here's just a sample of the success stories my students have sent in:


#JSON #Parsing #CodeWithChris

what is json,parse json,json parsing,how to parse json,codable swift,what is json parsing,codable protocol,json parsing in swift,json parsing tutorial,how to parse json in swift,json,json tutorial,json explained,json tutorial for beginners,learn json,json parsing example,json parsing swift 4,xcode,programming,swift,

Post a Comment

0 Comments