Codable
?Suggested approach: Give a specific answer first – “key decoding strategies let us handle difference between JSON keys and property names in our Decodable
struct” – then provide some kind of practical sample. For example, you might say that it’s common for JSON keys to use snake_case
for key names, whereas in Swift we prefer camelCase
, so we need to use a key decoding strategy to convert between the two.
Estimated difficulty: Easy
See the full list of iOS interview questions
Link copied to your pasteboard.