You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets say I implemented a custom encoder/decoder for a class, and registered them via cfg.global_config.
It works, but it doesn't work if that class is contained in a container (List / Dict).
I think the problem and potential solution (at least for the encoder's site) is in core.py's _asdict().
Shouldn't we check if type(obj) has a custom encoder, and use it if it exists?
Description
Lets say I implemented a custom encoder/decoder for a class, and registered them via cfg.global_config.
It works, but it doesn't work if that class is contained in a container (List / Dict).
I think the problem and potential solution (at least for the encoder's site) is in core.py's _asdict().
Shouldn't we check if type(obj) has a custom encoder, and use it if it exists?
Code snippet that reproduces the issue
Describe the results you expected
I expect the function to be called three times, but it is only called once.
Python version you are using
3.11.6
Environment description
dataclasses_json
The text was updated successfully, but these errors were encountered: