code: private static void writeTextToResponse(final HttpServletResponse res, final JSONResponse jsonResponse) throws IOException {
  		writeTextToResponse(res, jsonResponse.toString());
  	}
docs: Writes specified text to response and flushes the stream.
  
  @param res
  {@link HttpServletRequest}
  @param jsonResponse
  {@link JSONResponse}
  @throws java.io.IOException
  if an input or output exception occurred