Response.Json constructor

Response.Json(
  1. Jsonable jsonable, {
  2. int statusCode = HttpStatus.ok,
})

Typesafe constructor for a response for a jsonable

Implementation

Response.Json(Jsonable jsonable, {int statusCode = HttpStatus.ok})
    : this(statusCode, body: jsonEncode(jsonable));