Override from_dict() #321
Unanswered
mwerlberger
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In order to add some logic to the from_dict to instantiate the correct dataclass I would like to override the from_dict() function. Hence, I added the same as in the API. I could not get it to work and be picked up but don't understand why that is. A minimal example for this is attached below and the overridden function isn't called. I also tried to not inherit from
DataClassJsonMixinbut use the @dataclass_json decorator. Didn't change anything. What am I doing wrong?Beta Was this translation helpful? Give feedback.
All reactions