Replies: 1 comment 5 replies
-
Thank you for this suggestion. I agree, this could be useful. I moved this feature request to the issue list! |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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
Beta Was this translation helpful? Give feedback.
All reactions