from pathlib import Path


def _get_json_filename_from_scan_filename(scan_filename: Path) -> Path:
    """Replace the given `scan_filename` extensions with '.json'."""
    extensions = "".join(scan_filename.suffixes)
    return Path(str(scan_filename).replace(extensions, ".json"))