blog.iankulin.com

Codingkey

Codable when the keys don't match

How to decode JSON in Swift when the key names don’t match your struct’s property names. I cover using a CodingKeys enum to map JSON keys to properties manually, and the simpler keyDecodingStrategy option for handling the common snake_case versus camelCase mismatch...