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
I think that skip_if_default, skip_if_false, and skip_if don't work if there is a custom serializer?
skip_if_default
skip_if_false
skip_if
Example:
from serde import serde, field from dataclasses import dataclass from serde.json import to_json @serde @dataclass class Foo: bar: str = field( default="bar", serializer=lambda x: "...", skip_if_default=True, ) print(to_json(Foo())) # prints '{"bar":"..."}'
The text was updated successfully, but these errors were encountered:
It is actually intended behavior but I will double-check if this is possible 👍
Sorry, something went wrong.
No branches or pull requests
I think that
skip_if_default
,skip_if_false
, andskip_if
don't work if there is a custom serializer?Example:
The text was updated successfully, but these errors were encountered: