render method
Renders the JSON data to the response.
This method first sets the Content-Type header to 'application/json; charset=utf-8'
by calling writeContentType. It then converts the data to a JSON string using
jsonEncode and writes this JSON string to the response.
Implementation
@override
void render(Response response) {
writeContentType(response);
final jsonData = jsonEncode(data);
response.write(jsonData);
}