5. JSON CodingKeys - Swift

preview_player
Показать описание
I this video we will see how we can use a keyDecodingStrategy to change SnakeCase keys into CamelCase properties and follow that with finding out how you can map any key value in your json to any property name you like.

Series Resources:
Videos 1 - 8 all use the same Xcode Playground.
Video 9 Starter Projects

All Videos in this series

1. Introduction to JSON and Codable with Swift

2. The Basics of JSON Decoding - Swift

3. Getting JSON from a local file - Swift

4. JSON - Decoding Dates - Swift Codable

5. JSON CodingKeys - Swift

6. JSON - Custom CodingKeys- Swift

7. JSON from API - Swift

8. Encoding Data - Swift

9. Decode/Encode Sample Application - Swift

Stewart Lynch Links:

YouTube Playlist on iOS Development

Stewart Lynch’s CreaTECH Solutions Web Site

Stewart Lynch's GitHub

Stewart Lynch on Twitter
Рекомендации по теме
Комментарии
Автор

I started back with Objective C about 10 years ago and became very comfortable in creating very complex programs. One program in perticular which is being used by the Film, TV and Documentary industries. But when Apple switched over to Swift, I have been struggling to convert my frame of mind to Swift. Sadly, I have been lagging and I have not been able to make the paradigm shift and converting my mind to this new mind set. And then came SwiftUI and threw my mind in another downward spiral. I have been struggling since, TILL NOW. Mr. Lynch, you have opened the blinds and I am starting to see the sunshine. YOU TRULY HAVE THE GIFT OF EXPLAINING PRINCIPALS IN A VERY CALMING WAY. You have me hooked, line and sinker. Thank you very much. There is certainly more coffee coming your way.

hcri
Автор

You are too good sir... simply best tutorials and the way you explain... keep it up.. we developer need mentor like you...

JockR
Автор

I love your videos Stewart! Thank you so much for them. I plan to watch all of them.

SwiftySanders
Автор

Yay great tutorial ! WIth Symfony and API Platform as a backend it was so tricky to get data because of their key name (hydra:member, hydra:totalItems etc...), this video solved my problem

pimouxosu
Автор

Fantastic tutorial! Great explanation, thank you :)

dre
Автор

Since we use CodingKey, do we still need a strategy for decoder?

maximbrykov
Автор

Hello sir, i want to ask if i have 2 apis and one property key is different between them what do i do if the others are the same

Masa-louw
Автор

I just wasted an hour with errors because I couldn't tell the difference between lower case and capital K in the word "CodingKey". Great video though!

brandonwinston
join shbcf.ru