Macro json_response
Source macro_rules! json_response {
($($json:tt)+) => { ... };
}
Expand description
Return a JSON response from a handler using serde_json::json! syntax.
§Example
ⓘuse ferro_rs::json_response;
pub async fn index() -> Response {
json_response!({ "status": "ok" })
}