Conforming to Codable and Content redundant?

Just curious to know if its redundant to conform to both Codable and Content in our model.swift files, as described in the book?

Content conforms to Codable already. Is it just done this way for clarity or is there a specific reason we are doing it this way?

Thanks

1 Like

@0xtim Can you please help with this when you get a chance? Thank you - much appreciated! :]

@jjjeeerrr111, @shogunkaramazov I have been keeping it off, and have not run into any problems so far. Thanks for the heads up! :slight_smile:

@jjjeeerrr111 if you conform to Content initially then you don’t need to conform to Codable. Codable conformance has to be declared when you implement your model, so if you’re doing Content in an extension then you must do both. The reason why Content is conformed to in an extension is to show how you can share code with iOS. Hope that helps!

2 Likes