@Override
  public void serialize(final JsonGenerator jsonGenerator,
      final SerializerProvider serializerProvider) throws IOException {

    jsonGenerator.writeStartObject();
    jsonGenerator.writeArrayFieldStart(getRegionNamePath());

    for (T element : this) {
      JsonWriter.writeValueAsJson(jsonGenerator, element, null);
    }

    jsonGenerator.writeEndArray();
    jsonGenerator.writeEndObject();
  }
The RegionData class is a container for data fetched from a GemFire Cache Region.

@see com.fasterxml.jackson.databind.JsonSerializable
@see java.lang.Iterable
@since GemFire 8.0
geode-web-api/src/main/java/org/apache/geode/rest/internal/web/controllers/support/RegionData.java