json method

Response json(
  1. Map value
)

Implementation

Response json(
  Map value,
) {
  String body = convert.json.encode(value);
  headers.append("content-type", "application/json");

  return response(
    body: body,
    status: _status_code,
    statusText: _status_text,
    headers: headers,
  );
}