def convert2json_type(obj: set) -> list:
    """Convert sets to lists for JSON serialization."""
    if isinstance(obj, set):
        return list(obj)
    else:
        raise TypeError(f"Object of type {type(obj)} is not JSON serializable.")