(self, path: Path)
| 472 | self._load_all() |
| 473 | |
| 474 | def _load_json(self, path: Path) -> dict: |
| 475 | if not path.exists(): |
| 476 | return {} |
| 477 | try: |
| 478 | with open(path, "r", encoding="utf-8") as f: |
| 479 | return json.load(f) |
| 480 | except Exception: |
| 481 | return {} |
| 482 | |
| 483 | def _load_all(self): |
| 484 | mdcg = self._load_json(self.root / "eu_mdr" / "mdcg" / "_index.json") |