Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSwiftCodable custom keysSingle-choice MCQ

With `keyDecodingStrategy = .convertFromSnakeCase` set on the decoder, but a `CodingKeys` enum also present with explicit raw values, which wins?

struct Row: Decodable { let firstName: String enum CodingKeys: String, CodingKey { case firstName = "fname" } } // decoder.keyDecodingStrategy = .convertFromSnakeCase // JSON: {"fname": "Ada"}