acoustic-carpenter-78188
02/22/2023, 8:58 AMdataclass_json
Goal: What should the final outcome look like, ideally?
Add support for custom encoders and decoders to dataclass types, as described here.
https://lidatong.github.io/dataclasses-json/#extending
Describe alternatives you've considered
Currently the ugly workaround is decoding in __post_init__ and encoding via a @classmethod
Propose: Link/Inline OR Additional context
Should be easy to add in https://github.com/flyteorg/flytekit/blob/245c4143b4ed20487d837850df4a140c7b230986/flytekit/core/type_engine.py
Simply test for encoder and decoder when serializing/deserializing.
Would be good to add support for mm_field as well, to allow for custom serializers/deserializers that use non-string representations.
Are you sure this issue hasn't been raised already?
☑︎ Yes
Have you read the Code of Conduct?
☑︎ Yes
flyteorg/flyte