cuddly-jelly-27016
05/15/2025, 12:12 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/flytecuddly-jelly-27016
05/15/2025, 12:12 AM