JSONCodable
JSONCodable copied to clipboard
[WIP] Refactor to remove duplication
This trys to reduce the duplication of JSONCodable. It is still work in progress. But I would love to hear a few opinions
- Adds more small tests. When one tests fails it will be clear what causes the error.
- Reuses more code, which could make maintaining more easy.
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 😄