void json(Map<String, dynamic> data) { if (!isClosed) { _httpResponse.headers.contentType = ContentType.json; _httpResponse.write(jsonEncode(data)); close(); } }