thoughtbot/Argo

Decode a class?

agordeev opened this issue · 2 comments

I noticed all the examples here use structs. Is the library able to decode classes along with separating the decoding logic from the model itself?

Decoding classes is the same as decoding structs. There's no difference as far as Argo is concerned. Not sure what you mean by separating the decoding logic. The Decodable conformance needs to be done on the class/struct/enum, it can't live on a different object. But you can always put that conformance in a different file if you prefer.

I'm going to go ahead and close this due to inactivity but please feel free to reopen if this is still an issue.