def from_file(cls, db_file=ALL_SETS_PATH):
        """Reads card data from a JSON-file.

        :param db_file: A file-like object or a path.
        :return: A new :class:`~mtgjson.CardDb` instance.
        """
        if callable(getattr(db_file, 'read', None)):
            return cls(json.load(db_file))

        with io.open(db_file, encoding='utf8') as inp:
            return cls(json.load(inp))
Reads card data from a JSON-file.

        :param db_file: A file-like object or a path.
        :return: A new :class:`~mtgjson.CardDb` instance.