We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For reasons I have something like this:
from pathlib import PosixPath class Test(PosixPath): ...
It works just fine on its own:
from serde.json import to_json t = Test('.') print(to_json(t)) # "."
But when a member of another dataclass I get SerdeError:
dataclass
SerdeError
@dataclass class B: p: Test b = B(Test('.')) print(to_json(b)) # serde.compat.SerdeError: Unsupported type: Test
Full repro: https://gist.github.com/davetapley/8c71c2918cd587442f3af7a1e4a24c40
The text was updated successfully, but these errors were encountered:
For now I can workaround with custom add_serializer / add_deserializer.
add_serializer
add_deserializer
Sorry, something went wrong.
FYI this example is now broken due to:
No branches or pull requests
For reasons I have something like this:
It works just fine on its own:
But when a member of another
dataclass
I getSerdeError
:Full repro: https://gist.github.com/davetapley/8c71c2918cd587442f3af7a1e4a24c40
The text was updated successfully, but these errors were encountered: