matthewcheok / JSONCodable

Hassle-free JSON encoding and decoding in Swift
MIT License
602 stars 66 forks source link

[WIP] Refactor to remove duplication #71

Open lightsprint09 opened 7 years ago

lightsprint09 commented 7 years ago

This trys to reduce the duplication of JSONCodable. It is still work in progress. But I would love to hear a few opinions

Nadohs commented 7 years ago

If you can get rid of duplication within the decode methods and get the tests working that would be great! Currently we are using multiple functions as a work around for the different ways the generic type could be returned, but if you can reuse some of the duplication that could be a nice refactoring win.

More tests are always great too 😄