-
-
Notifications
You must be signed in to change notification settings - Fork 74
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
OneOrMany serialization not implemented? #728
Comments
OK, I realized this is just a docs issue. If we change the annotation to
it works correctly. |
In your first post you only specify |
I appreciate that I was using it wrong. As I mentioned in my second comment, its because the docs are wrong or at least misleading - see https://docs.rs/serde_with/latest/serde_with/struct.OneOrMany.html. They don't specify to use |
Yes indeed. I update the doctest to ensure serialization is tested and align it more with the other examples. |
Hi, thanks for the great crate, I use it all the time.
The docs seems to suggest that
OneOrMany
will serialize aVec
as a singleton or list depending upon config. There is even a helpful example. However the example does not actually demo serialization and in face serialization does not actually work. Inspecting the generated code withcargo expand
, it seems to do nothing at all.Repro:
The text was updated successfully, but these errors were encountered: