Write Clean code for JSON API parsing in swift | parse JSON response in swift (Hindi)

Описание к видео Write Clean code for JSON API parsing in swift | parse JSON response in swift (Hindi)

API parsing in swift using JsonDecoder and Decodable protocol is what I explained in the previous swift tutorial and now you can easily parse API in swift with just one single line of code. Now when you have learned swift JSON API parsing, what I want to show you is API parsing in swift can be done with JSONSerialization class in swift, but API parsing in swift becomes easy if you are using the decodable protocol. The code written to parse the JSON API is mostly copy-pasted at all the places.

In this video, I would like to show you how you can write clean code in swift using some advance features like generics in swift and closures in swift.

Generics in Swift is a powerful feature that many developers are yet not aware of but if you use them wisely you will slowly understand how amazing generic in swift is and what they can do. I have covered the base of generics in swift in one of my old video tutorials so if you are new to generics in swift I would recommend you watch that video.

Closures in Swift are already covered in many of my previous swift tutorials and are one of the features that I really like and use a lot.

Combining generic in swift and closures in swift for parsing JSON API is what I am showing you here in this swift tutorial is that how your thinking process should be when it comes to code clean up or writing mature code in swift programming.

Usually, if you grab a code in one spot and drop it in other places, then it’s not called cleaning up code you are just dropping the code that’s all, what you should be doing is using few features as shown in this video and clean up your code and make it more reusable.

The idea is not to write code but to write reusable code and how can we write reusable code is by applying techniques like these. I want to show you how you can write reusable code and how easy it is to write reusable code in swift.

If you think this video has helped you improve your approach on how you clean up your code and make it more reusable then all I ask is to like and share this video with your iOS group.

If you are new to the channel then I request you to please subscribe and share it with your friends and swift programming team.

Please subscribe to the channel :)

Download the code from the given links

GitHub: https://github.com/codecat15/Youtube-...

Google Drive: https://drive.google.com/open?id=1_GF...

Music: https://www.bensound.com/

Connect with me on social media

Email: [email protected]
Twitter:   / codecat15  
Facebook:   / code.cat.792  
Github: https://github.com/codecat15

#apiParsingSwift #parseJsonApiSwift #swiftJsonParsing

Комментарии

Информация по комментариям в разработке