json method
Returns a JSON response.
Implementation
Response json(
Object? body, {
int statusCode = 200,
Map<String, Object>? headers,
}) {
// TODO: Implement JSON serialization
return Response(
statusCode,
body: body.toString(),
headers: {'content-type': 'application/json', ...?headers},
);
}