pub fn json_encoded<T>(data: T) -> ResponseBuilder<String>
where T: Serialize,
Expand description

respond with a body that is the json encoding of data.

The status code will be 200 and the content-type will be application/json.