private ArrayNode getRegionJson(Cluster cluster) {

    Long totalHeapSize = cluster.getTotalHeapSize();
    Long totalDiskUsage = cluster.getTotalBytesOnDisk();

    Map<String, Cluster.Region> clusterRegions = cluster.getClusterRegions();

    List<Cluster.Region> clusterRegionsList = new ArrayList<>(clusterRegions.values());
    clusterRegionsList.sort(regionEntryCountComparator);

    ArrayNode regionListJson = mapper.createArrayNode();
    for (Cluster.Region reg : clusterRegionsList) {
      ObjectNode regionJSON = mapper.createObjectNode();

      regionJSON.put("name", reg.getName());
      regionJSON.put("totalMemory", totalHeapSize);
      regionJSON.put("systemRegionEntryCount", reg.getSystemRegionEntryCount());
      regionJSON.put("memberCount", reg.getMemberCount());

      final String regionType = reg.getRegionType();
      regionJSON.put("type", regionType);
      regionJSON.put("getsRate", reg.getGetsRate());
      regionJSON.put("putsRate", reg.getPutsRate());

      Cluster.Member[] clusterMembersList = cluster.getMembers();

      ArrayNode memberNameArray = mapper.createArrayNode();
      for (String memberName : reg.getMemberName()) {
        for (Cluster.Member member : clusterMembersList) {
          String name = member.getName();
          name = name.replace(":", "-");
          String id = member.getId();
          id = id.replace(":", "-");

          if ((memberName.equals(id)) || (memberName.equals(name))) {
            ObjectNode regionMember = mapper.createObjectNode();
            regionMember.put("id", member.getId());
            regionMember.put("name", member.getName());
            memberNameArray.add(regionMember);
            break;
          }
        }
      }

      regionJSON.set("memberNames", memberNameArray);
      regionJSON.put("entryCount", reg.getSystemRegionEntryCount());

      boolean persistent = reg.getPersistentEnabled();
      if (persistent) {
        regionJSON.put("persistence", VALUE_ON);
      } else {
        regionJSON.put("persistence", VALUE_OFF);
      }

      boolean isEnableOffHeapMemory = reg.isEnableOffHeapMemory();
      if (isEnableOffHeapMemory) {
        regionJSON.put("isEnableOffHeapMemory", VALUE_ON);
      } else {
        regionJSON.put("isEnableOffHeapMemory", VALUE_OFF);
      }

      String regCompCodec = reg.getCompressionCodec();
      if (StringUtils.isNotBlank(regCompCodec)) {
        regionJSON.put("compressionCodec", reg.getCompressionCodec());
      } else {
        regionJSON.put("compressionCodec", VALUE_NA);
      }

      regionJSON.put("regionPath", reg.getFullPath());

      regionJSON.set("memoryReadsTrend", mapper
          .valueToTree(reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_GETS_PER_SEC_TREND)));
      regionJSON.set("memoryWritesTrend", mapper
          .valueToTree(reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_PUTS_PER_SEC_TREND)));
      regionJSON.set("diskReadsTrend", mapper.valueToTree(
          reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_READS_PER_SEC_TREND)));
      regionJSON.set("diskWritesTrend", mapper.valueToTree(
          reg.getRegionStatisticTrend(Cluster.Region.REGION_STAT_DISK_WRITES_PER_SEC_TREND)));
      regionJSON.put("emptyNodes", reg.getEmptyNode());
      long entrySize = reg.getEntrySize();
      String entrySizeInMB = FOUR_PLACE_DECIMAL_FORMAT.format(entrySize / (1024f * 1024f));

      if (entrySize < 0) {
        regionJSON.put(ENTRY_SIZE, VALUE_NA);
      } else {
        regionJSON.put(ENTRY_SIZE, entrySizeInMB);
      }
      regionJSON.put("dataUsage", reg.getDiskUsage());
      regionJSON.put("wanEnabled", reg.getWanEnabled());
      regionJSON.put("totalDataUsage", totalDiskUsage);

      regionJSON.put("memoryUsage", entrySizeInMB);

      regionListJson.add(regionJSON);
    }

    return regionListJson;
  }
This method is used to get various regions associated with the given cluster and create json
for each region fields and returns Array List for all the regions associated with given cluster

@return ArrayNode Array List
geode-pulse/src/main/java/org/apache/geode/tools/pulse/internal/service/ClusterRegionService.java