Any reference to implement Responder for Vec #1759
Answered
by
SergioBenitez
sagarnayak
asked this question in
Questions
-
My user.rs
rocket endpoint -
I want to return a vec of users. Do I need to impl Responder for vec ? or i am on working path? |
Beta Was this translation helpful? Give feedback.
Answered by
SergioBenitez
Jul 12, 2021
Replies: 2 comments 2 replies
-
You never need to use serde_JSON directly. All of the docs guide you to the right path: return |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
sagarnayak
-
This is what I changed -
I got confused here - Rocket Wrapping. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You never need to use serde_JSON directly. All of the docs guide you to the right path: return
Json<Vec<T>>
, where Json isrocket::serde::json::Json
.