MediaType mediaType,
MultivaluedMap<String, Object> httpHeaders,
OutputStream entityStream) throws IOException, WebApplicationException {
Object[] rootNode = AnalyticsNodeJsonWriter.getJsonStructure(gridStructure.getRootNode());
List<Map<String, Object>> columns = _writer.getJsonStructure(gridStructure.getColumnStructure().getGroups());
ValueRequirementJSONBuilder jsonBuilder = new ValueRequirementJSONBuilder();
String valueReqStr = jsonBuilder.toJSON(gridStructure.getRootRequirement());
JSONObject valueReqJson;
try {
// need to convert it to a JSON object instead of a string otherwise it will be inserted into the outer object
// as an escaped string instead of a child object
valueReqJson = new JSONObject(valueReqStr);