(path: str | Path)
| 70 | |
| 71 | |
| 72 | def load_json_file(path: str | Path) -> dict[str, Any]: |
| 73 | data = json.loads(Path(path).expanduser().resolve().read_text(encoding="utf-8")) |
| 74 | if not isinstance(data, dict): |
| 75 | raise RuntimeError("Expected a JSON object.") |
| 76 | return data |
| 77 | |
| 78 | |
| 79 | def maybe_load_json_record(value: str | None) -> dict[str, Any] | None: |
no outgoing calls
no test coverage detected