def from_json(
        cls,
        json_path,
        zoo_dataset=None,
        upgrade=False,
        warn_deprecated=False,
    ):
        """Loads a :class:`ZooDatasetInfo` from a JSON file on disk.

        Args:
            json_path: path to JSON file
            zoo_dataset (None): an existing :class:`ZooDataset` instance
            upgrade (False): whether to upgrade the JSON file on disk if any
                migrations were necessary
            warn_deprecated (False): whether to issue a warning if the dataset
                has a deprecated format

        Returns:
            a :class:`ZooDatasetInfo`
        """
        dataset_dir = os.path.dirname(json_path)
        d = etas.read_json(json_path)

        # Handle remote zoo datasets
        if zoo_dataset is None:
            zoo_dataset_cls = etau.get_class(d["zoo_dataset"])
            if issubclass(zoo_dataset_cls, RemoteZooDataset):
                url = d.get("url")
                zoo_dataset = zoo_dataset_cls(dataset_dir, url=url)

        info, migrated = cls._from_dict(d, zoo_dataset=zoo_dataset)

        # Handle migrated zoo datasets
        if upgrade and migrated:
            logger.info("Migrating ZooDatasetInfo at '%s'", json_path)
            etau.move_file(json_path, json_path + ".bak")
            info.write_json(json_path, pretty_print=True)

        # Handle deprecated zoo datasets
        if warn_deprecated:
            if isinstance(info.get_zoo_dataset(), DeprecatedZooDataset):
                logger.warning(
                    "You are loading a previously downloaded zoo dataset that "
                    "has been upgraded in this version of FiftyOne. We "
                    "recommend that you discard your existing download by "
                    "deleting the '%s' directory and then re-download the "
                    "dataset to ensure that all import/download features are "
                    "available to you",
                    dataset_dir,
                )

        return info
Loads a :class:`ZooDatasetInfo` from a JSON file on disk.

        Args:
            json_path: path to JSON file
            zoo_dataset (None): an existing :class:`ZooDataset` instance
            upgrade (False): whether to upgrade the JSON file on disk if any
                migrations were necessary
            warn_deprecated (False): whether to issue a warning if the dataset
                has a deprecated format

        Returns:
            a :class:`ZooDatasetInfo`
        
fiftyone/zoo/datasets/__init__.py