public static Map<String, DcZkInfo> parseDcJsonAndPopulateDcInfo(String dcInfoJsonString) throws JSONException {
    Map<String, DcZkInfo> dataCenterToZkAddress = new HashMap<>();
    JSONObject root = new JSONObject(dcInfoJsonString);
    JSONArray all = root.getJSONArray(ZKINFO_STR);
    for (int i = 0; i < all.length(); i++) {
      JSONObject entry = all.getJSONObject(i);
      String name = entry.getString(DATACENTER_STR);
      byte id = (byte) entry.getInt(DATACENTER_ID_STR);
      ReplicaType replicaType = entry.optEnum(ReplicaType.class, REPLICA_TYPE_STR, ReplicaType.DISK_BACKED);
      ArrayList<String> zkConnectStrs =
          (replicaType == ReplicaType.DISK_BACKED) ? Utils.splitString(entry.getString(ZKCONNECT_STR),
              ZKCONNECT_STR_DELIMITER) : Utils.splitString(entry.optString(ZKCONNECT_STR), ZKCONNECT_STR_DELIMITER);
      DcZkInfo dcZkInfo = new DcZkInfo(name, id, zkConnectStrs, replicaType);
      dataCenterToZkAddress.put(dcZkInfo.dcName, dcZkInfo);
    }
    return dataCenterToZkAddress;
  }
Parses DC information JSON string and returns a map of datacenter name to {@link DcZkInfo}.
@param dcInfoJsonString the string containing the DC info.
@return a map of dcName -> DcInfo.
@throws JSONException if there is an error parsing the JSON.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/ClusterMapUtils.java