Parse JSON in App Like a PRO (Xcode 12, Swift 5, 2020) - iOS Development
HTML-код
- Опубликовано: 15 сен 2024
- 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.
💻 Source Code: / iosacademy
🎥 Subscribe for more: www.youtube.co...
😎 Like my teaching style? Check out some of my most popular courses!: courses.iosaca...
#swift #iOSDeveloper #JSON
Join this channel to get access to perks, code, groups, and more:
/ @iosacademy
Join the iOS Academy Community: iosacademy.io/
** Get Skillshare free for 2 Months and learn iOS
www.skillshare...
** Manage all your investments from app earnings on Betterment!
bit.ly/3eBwlI9
** Grow your own RUclips tech channel with TubeBuddy:
www.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
Haha glad to help
So happy you changed your video style to not zooming in n out all the time. Also great tutorial!
Why? Its people like you that have made it difficult to read now. Whats the issue? Are you on some huge screen or something? When hes coding he should zoom in. The problem is zooming out and in after every word or something. Otherwise zooming is good! I don’t need to see his launch bar, i don’t need to see Xcode or the files on the left.
TheBooban “people like you” relax lol. The zooming and out continuously makes me feel nauseous
Thanks for this video. Very helpful. I can’t wait for the Instagram and TikTok courses coming soon.
Thanks, glad you like the content
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!
That would be UHHMAZINN !!
Very useful. Thank you!
As always, useful content. Thanks. 👏🏻👏🏻
Thanks!
so easy this example we need complex stuff
Coming soon
Useful video, Thank you.
Glad it was helpful!
Hi Everytime my code enter the else part of the guard let path = Bundle.main.path(...) else { print("error") return }
Awesome Video ..... Looking forward for SwiftUI Content
Thanks
Not really...barf. Id rather learn flutter.
I looooooove 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?
What ever you type code we write but I am not getting output in screen can you tell me.
That’s good sh..stuff!
Lol thanks
Great video! Loved it!
Thank you!
Youre welcome
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
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.
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?
Hello! Can you tell me how to search within the key value pair? And how do you iterate through the Results!
Please do a Video on Alamofire + SwiftyJson.
Coming soon
I want to add 2 columns to my cell, but nothing i am trying is working
gah!!
Nice video 👍🏼, How to decode different date formats in same json
great video, how can you decode dynamic json data
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?
You have to select "storyboard" as interface when creating a new app project, not "SwiftUI". And make sure to select the language as "Swift" to be able to follow this tutorial.
How to make login (user sign) by mysql?
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
do you have a download link for that
can ı use it for swiftui too
Thanks for providing amazing tutorials. Could you please do a tutorial on Instagram build api integration with firebase in Swift
Thanks and sure! Added to my list
Hi ,i started learning ios those days , should i learn uikit first or just pass to swiftui ?
Go with UIKit first
@@mellamoraymond why? Its so different from SwiftUi and it unfortunately seems to be the future...barf
I joined the community, but still can't find the code.
Ill add you to the github
@@iOSAcademy looking forward to having access to the code.
@@iOSAcademy I've not received an email that I've been added. Not to pester, but it's been 3 days and I see you're actively posting content here.
Yo, what happened to your microphone? You sound muffled
Don't watch this video, is misleading.. it decodes from a file, not a URL...
Its the sams thing
You realise you could easily omit the path step by using: Bundle.main.url(forResource: “data”, withExtension: “json”)
Yep, just showing the original way
Hi there, thanks for the great video! I think the first error happened, because you could just leave the curly braces away, to have the json file starting and ending with just [ ] ( www.crockford.com/mckeeman.html )