-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
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
alias
broken for list
#432
Labels
bug
Bug report or fix
Comments
Hi @opeik Sorry, I don't have bandwidth to look into this issue. If you're interested in contributing, I am happy to assist you. |
Hey @yukinarit, don't stress. I would never demand maintainers fix my problems. Thanks for taking a look 🙇♀️ |
Just wanted to add to this: Also doesn't seem to work for nested types @serde
@dataclass
class Bar:
e: int
f: str
@serde
@dataclass
class Foo:
a: Bar | None = field(default=None, alias=["b"])
# works
s = '{"a": {"e": 5, "f": "baz"}}'
print(f"From Json: {from_json(Foo, s)}")
# works
s = '{"b": null}'
print(f"From Json: {from_json(Foo, s)}")
# doesnt work
s = '{"b": {"e": 5, "f": "baz"}}'
print(f"From Json: {from_json(Foo, s)}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there,
Back again with another potential bug. Using
[email protected]
, I've run into deserialization failures for two situations I think should be valid:Both fail with
serde.compat.SerdeError: 'a'
, I wish I could give you a more useful error message.The text was updated successfully, but these errors were encountered: