lidatong / dataclasses-json

Easily serialize Data Classes to and from JSON
MIT License
1.34k stars 151 forks source link

Fix: if field has custom decoder, schema takes it into account #462

Closed deansg closed 11 months ago

deansg commented 11 months ago

If a field has a custom decoder, replace its _deserialize logic with a dummy method, as it will be taken care of by the decoder.

Attempts to solve #460

deansg commented 11 months ago

This is just an initial version. I'd like to know if I'm in the right direction or if this isn't it.

deansg commented 11 months ago

@george-zubrienko I reverted all formatting changes except for a single line which only contained spaces which PyCharm just won't let me change back, I hope it's not a deal breaker. I also added an extended comment explaining the change. Let me know if you have more comments.