docs: public JSONObject topologyToJSON() throws JSONException {
          JSONStringer stringer = new JSONStringer();
          stringer.object();
  
          stringer.keySymbolValuePair(TOPO_VERSION, version);
  
          stringer.key(TOPO_PARTITIONS).array();
          for (Partition partition : partitionsById.values()) {
              partition.toJSON(stringer);
          }
          stringer.endArray();
  
          stringer.key(TOPO_HOSTS).array();
          for (Host host : hostsById.values()) {
              host.toJSON(stringer);
          }
          stringer.endArray();
          stringer.keySymbolValuePair(TOPO_SITES_PER_HOST, getSitesPerHost());
          stringer.keySymbolValuePair(TOPO_REPLICATION_FACTOR, getReplicationFactor());
          stringer.keySymbolValuePair(TOPO_UNBALANCED_PART_COUNT, m_unbalancedPartitionCount);
  
          stringer.endObject();
  
          return new JSONObject(stringer.toString());
      }