-
Notifications
You must be signed in to change notification settings - Fork 36
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
Support for #[derive(Serialize)] #72
Milestone
Comments
For complex serialization processes involving I believe all Cornucopia-supported types either do or could derive |
In the works...! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Discussed in #71
Originally posted by ianpurton May 26, 2022
Would you consider adding the ability to tag the structs you create with #[derive(Serialize)]?
The reason for this is that in a lot of web frameworks you can convert structs to JSON as long as they are tagged with the Serde macro.
For example see how Axum handles it.
https://docs.rs/axum/latest/axum/struct.Json.html
perhaps an argument --derive '#[derive(serve::Serialize)]' or perhaps --struct-prefix
Thanks
The text was updated successfully, but these errors were encountered: