[BUG] Extending de/encoders do not work with from __future__ import annotations
#547
Labels
bug
Something isn't working
from __future__ import annotations
#547
Description
Writing my own class to be used as a dataclass field, I extend the json encoder / decoder with
dataclasses_json.cfg.global_config.encoders/decoders
.When adding
from __future__ import annotations
the type turns to str and the encoder / decoder I've added to cfg does not automatically detect it as that type.workaround : adding the same encoder/decoder to cfg with key cls.name in addition to cls
Code snippet that reproduces the issue
This is what I get
Describe the results you expected
Python version you are using
3.11.4
Environment description
The text was updated successfully, but these errors were encountered: