ServerResponse.json constructor
Creates a JSON response.
Implementation
factory ServerResponse.json(
Object? value, {
int status = 200,
Headers? headers,
}) => ServerResponse.bytes(
utf8.encode(jsonEncode(value)),
status: status,
contentType: 'application/json; charset=utf-8',
headers: headers,
);