private ResponseEntity<InputStreamResource> getJsonResponse(String result) {
    HttpHeaders respHeaders = new HttpHeaders();
    try {
      InputStreamResource isr = new InputStreamResource(toInputStream(result, "UTF-8"));
      respHeaders.set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
      return new ResponseEntity<>(isr, respHeaders, HttpStatus.OK);
    } catch (Exception e) {
      throw new RuntimeException("IO Error writing file to output stream", e);
    }
  }
The ShellCommandsController class implements GemFire REST API calls for Gfsh Shell Commands.

@see org.springframework.stereotype.Controller
@see org.springframework.web.bind.annotation.RequestBody
@see org.springframework.web.bind.annotation.RequestMapping
@see org.springframework.web.bind.annotation.RequestMethod
@see org.springframework.web.bind.annotation.RequestParam
@see org.springframework.web.bind.annotation.ResponseBody
@since GemFire 8.0
geode-web/src/main/java/org/apache/geode/management/internal/web/controllers/ShellCommandsController.java