protected String convert(final Iterable<PdxInstance> pdxObjs) {
    final StringBuilder buffer = new StringBuilder("[");
    int count = 0;

    for (final PdxInstance pdxObj : pdxObjs) {
      final String json = convert(pdxObj);

      if (StringUtils.hasText(json)) {
        buffer.append(count++ > 0 ? ", " : "").append(json);
      }
    }

    buffer.append("]");

    return buffer.toString();
  }
AbstractBaseController class contains common functionalities required for other controllers.

@since GemFire 8.0
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/AbstractBaseController.java