Parse JSON in App Like a PRO (Xcode 12, Swift 5, 2020) - iOS Development

preview_player
Показать описание
In this video we will learn how to parse JSON from a file directly in our app. We will be working in swift 5 and Xcode 12 as always. JSON parsing is a critical skill needed for any iOS app - one that every developer should master. We will leverage the main bundle and Codable to get this up and running. We will also look at taking the data and presenting it in a clean and organized table view.

#swift #iOSDeveloper #JSON

Join this channel to get access to perks, code, groups, and more:

** Get Skillshare free for 2 Months and learn iOS

** Manage all your investments from app earnings on Betterment!

** Grow your own Youtube tech channel with TubeBuddy:
Рекомендации по теме
Комментарии
Автор

It’s ironic how I was searching an hour ago to parse json in Swift and this video was just uploaded ! Lol nice video

mac
Автор

As always, useful content. Thanks. 👏🏻👏🏻

muncho
Автор

Thanks for this video. Very helpful. I can’t wait for the Instagram and TikTok courses coming soon.

Alexander-mgpr
Автор

Love the content. Thank you so much for posting. It's exactly what I was looking for. Liked and subscribed.

Question. You put parseJSON() directly in the VC. But in an app that follows the MVC model, I would put all that code in its own .swift file under Model, right?

etiennecasassa
Автор

I this. I've been trying to find a dictionary of arrays json parsing using a json file. your tutorial is great. when I followed along (using my own data), it kept on repeating my json data multiple times per section. If I had a section called "Fruit" it would list all things under fruit, but it would list them like 10 times and then move on to the next item and repeat that 10 times. any thoughts?

robertcleary
Автор

Hello! Can you tell me how to search within the key value pair? And how do you iterate through the Results!

BoxingGuru
Автор

Hey dude. How about a video teaching how to save the return of the web request in coredata?! Other sugestions is work with Repository. Thank you for your videos. U're awesome.

alley
Автор

Video recommendation DEBUGGING console for "Breaking Constraints" for the UI and how to fix and know where the error is....Thanks for your videos and experience!

guarino
Автор

great video, how can you decode dynamic json data

coucoseth
Автор

So happy you changed your video style to not zooming in n out all the time. Also great tutorial!

ilz
Автор

Nice video 👍🏼, How to decode different date formats in same json

Rahul-jfkf
Автор

Awesome Video Looking forward for SwiftUI Content

GG-hkiz
Автор

Hi Everytime my code enter the else part of the guard let path = Bundle.main.path(...) else { print("error") return }

ecptavares
Автор

How to make login (user sign) by mysql?

PutraTrie
Автор

When you enter in a function into the view of a swift ui it doesn't work, can this code be used in some way with swift ui? p.s. I like your videos

t.shurid
Автор

Thanks for providing amazing tutorials. Could you please do a tutorial on Instagram build api integration with firebase in Swift

shivareddy
Автор

Thank you so much for this. The only thing that drives me nuts about your vids is that you seem to have a template or series of templates already installed so it's hard to code along with you. When I open a new SwiftUI, I don't have ViewController, Main.Storyboard, and others. Do you have a tutorial to set our initial screens up like yours so it's easier to follow along?

Neurofunkworldwide
Автор

so easy this example we need complex stuff

habilel
Автор

What ever you type code we write but I am not getting output in screen can you tell me.

anjik
Автор

Im trying to follow this video with a json file containing some vinyls record but inside the do catch the print statement inside the catch always gets executed.
How to solve this problem? Where to look for the problem. Here is my code:
func parseJSON() {
guard let path = Bundle.main.path(forResource: "teste", ofType: "json") else { return }
let url = URL(fileURLWithPath: path)
var vinyl : VinylModel?
do {
let jsonData = try Data(contentsOf: url)
vinyl = try JSONDecoder().decode(VinylModel.self, from: jsonData)
if let vinyl = vinyl {
print(vinyl)
return
}
} catch {
print("ERROR")
}
}
thank u

ecptavares