Тёмный

iOS Swift Tutorial - Working with the Web - How to parse JSON into model objects with Codable 

Karin Prater
Подписаться 18 тыс.
Просмотров 9 тыс.
50% 1

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 22   
@georgehyker
@georgehyker 4 месяца назад
Thank you Karin!
@ovadianyc
@ovadianyc 3 года назад
Thank you. This was very helpful and well explained.
@SwiftyPlace
@SwiftyPlace 3 года назад
So glad!
@yaroslavhoncharenko106
@yaroslavhoncharenko106 Год назад
Hello, if it's possible, could you make video about pushing the data fron JSON stage to TableView by using UIKit? Tutorial was avesome! My love for it
@CorexoDeu
@CorexoDeu 3 года назад
Ich finde es Toll wie du auf die ganzen Themen eingehst, durch deine Videoreihe konnte ich erst richtig verstehen wie man mit Swift umgeht. Genau auf dieses Video habe ich gewartet. Ich bin gerade dabei an meiner App über die Socket.IO Schnittstelle Live Daten (im JSON Format) an die App zu senden komme seit Tagen nicht weiter, weil mir Swift immer nur Fehler auswirft. Danke :)
@Виталий-о5ъ3ц
@Виталий-о5ъ3ц 2 года назад
Thank you very much. It was very helpful for me!
@nebilgokdemir4527
@nebilgokdemir4527 Год назад
great lecture thank you
@nickchong1326
@nickchong1326 2 года назад
Thank you! useful
@rank1macro
@rank1macro 2 года назад
Hey thank you for explanations, everything works perfectly besides one last thing: let breeds: [Breed]. Even though I did everything like you, I still get the error 39:31 but with stringValue: "breeds" instead
@DeconstructedLearningOfficial
Hi can you explain how to call two different api in the same app
@cengizhan4706
@cengizhan4706 2 года назад
You explained a w e s o m e thanks
@SwiftyPlace
@SwiftyPlace 2 года назад
Happy to hear that 😃
@cometmace
@cometmace 2 месяца назад
Thank you for doing a wonderful job explaining things like Codeable, CodingKeys and custom decoding via the init().
@vazzhh
@vazzhh Год назад
muchas gracias profee
@TommyKarlstedt
@TommyKarlstedt 10 месяцев назад
Your head us bouncing around like crazy, cant watch thus
@shahmirzali_huseynov
@shahmirzali_huseynov Год назад
Did you you here Api Key for cat api ? and where ? cause in the website written api key is required
@theflutterguy6301
@theflutterguy6301 3 месяца назад
good stuff
@sharence4276
@sharence4276 2 года назад
Hello, what does a JSON file mean? I dont understand anything about those computer tools and files. I just found a random fhir.json 2 file on my iphone in my documents. Could this be a spyware or is it just some other document scrypt from my iphone? ( i did not put it on my phone ) thats why i tought it is weird. You would really help me! Thank you in advance
@MauricioChavesDias
@MauricioChavesDias 3 года назад
What a cute cat! Thanks for this video, Karin!
@emrah309
@emrah309 2 года назад
top level teaching, thanks Karin!
@SBSanook
@SBSanook 3 года назад
This is really great! I wish I'd seen these first two videos ~6 months ago when I was first learning about working with APIs - really a good explanation of how they work and how you create your model, even a bit more complicated models. Maybe this will be brought up in the third video, but for the fake boolean (like hairless, with Int result of 0 or 1), would it be better to decode the JSON as is (with Int), but then assign the true/false value in a separate view model based on the Int result? It seems really messy to try to assign true/false while decoding, especially if you wanted to use a lot of the returned results.
@SwiftyPlace
@SwiftyPlace 3 года назад
Glad you found the API explanations helpful. I had the impression a lot of other material skips over the basic, which was a problem for me too when I was learning about APIs. About the Boolean decoding. I used this as an example for more advanced data formatting. You could leave it in as an Int. But this might confuse you later on in a larger project, when you forgot that this number should be used as a Boolean. After a couple of weeks or months, you might not directly remember everything. I am okay writing larger models that reduce the complexity for other parts of the app like in the views. In a company project, the backend engineering will probably have a Boolean value directly in the JSON, which means you don't have to work that much on the models. Also, the company will have some form of design rules for how to write certain types of code to make the code more uniform and easier to understand for multiple people. For you personal project, if you are the only one using this code, you can set your own conventions and stick with the Int.
Далее
Using Generics to decode JSON
20:37
Просмотров 2,7 тыс.
titan tvman's plan (skibidi toilet 77)
01:00
Просмотров 2,5 млн
А Вы за пластику?
00:31
Просмотров 12 тыс.
Being Competent With Coding Is More Fun
11:13
Просмотров 79 тыс.
Данные из API в TableView на Swift
14:15
Просмотров 8 тыс.
What is JSON - JSON Parsing in Swift
24:15
Просмотров 74 тыс.
Brutally honest advice for new .NET Web Developers
7:19
Fetch Data from JSON API into SwiftData Database
32:27
Просмотров 2,5 тыс.
titan tvman's plan (skibidi toilet 77)
01:00
Просмотров 2,5 млн