(path: Path)
| 77 | |
| 78 | |
| 79 | def load_json(path: Path) -> dict[str, Any]: |
| 80 | with path.open("r", encoding="utf-8") as f: |
| 81 | data = json.load(f) |
| 82 | if not isinstance(data, dict): |
| 83 | raise ValueError(f"{path} must be a JSON object") |
| 84 | return data |
| 85 | |
| 86 | |
| 87 | def save_json(path: Path, data: dict[str, Any]) -> None: |
no outgoing calls
no test coverage detected