There's an easier way, you can conform Podcast to Codable with no additional work, using JSONEnconder to encode the podcast to data, and save it in the user defaults. Later when you want to retrieve it, get the data object from UserDefaults, and use JsonDecoder to transform the data to class directly. It takes 4 lines of code to do that, and you don't have to write any new protocol methods or write all the raw string keys.