Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDominic Bryan
14,452 PointsRecap: Refactoring Using Codable
import Foundation
struct Vehicle: Codable { let model: String
enum CodingKeys: String, CodingKey {
case model = "model"
}
}
I dont see what is wrong with this answer
Christian A. Castro
30,501 PointsDominic Bryan same issue!! Did you solved out? Any recommendations.. please!!
Dominic Bryan
14,452 PointsChristian A. Castro Yes, I followed Jordan Leahy's advice and omitted the = "model" from each case. All videos leading up to this practise example explicitly evaluated all enum cases to a String, but you do not have to, bit misleading from the lessons on this one.
Jordan Leahy
25,054 PointsJordan Leahy
25,054 PointsI agree it should work but they want you to omit the = "model" since infers string as a raw value