-
-
Notifications
You must be signed in to change notification settings - Fork 517
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
How to Deserialize an ActiveModel ? and a request for Serialization examples #457
Comments
hI @billy1624, I played with the examples but it seems like the underlying issue is So can the ActiveModel add support for Serialize? Or can I convert an ActiveModel to just a Model and just use derive Serialize on it? I'm pretty new to rust so you can feel free to point out if I'm missing /misunderstanding something here |
If you want to get back the inserted / updated model in |
Thanks. Insert was what I needed to get it working. Is it not possible to make the |
Is there any reason you need to |
Yup. That's what I ended up doing. I was trying to come up with ways to not write new types by hand for each table. |
Nice! Feel free to ping us if you got any other questions :) |
I'm trying to implement a basic CRUD app and I'm a bit lost. I'm trying to create a REST API with Axum. I've been trying to use the
Json(new_active_model)
. Is this not supported by Serde yet ?Regardless of the problem that I'm facing, It'd be nice if the examples and/or docs were updated showing how to serialize and deserialize entities/models, as well as, examples for REST APIs
The text was updated successfully, but these errors were encountered: