(file_path: Path)
| 55 | |
| 56 | class JSONReader(Reader): |
| 57 | def parse_file(file_path: Path) -> list: |
| 58 | logger.info(f"Reading JSON file from {file_path}.") |
| 59 | try: |
| 60 | with open(file_path, "r") as f: |
| 61 | data = json.load(f) |
| 62 | |
| 63 | return data |
| 64 | except: |
| 65 | return [] |
| 66 | |
| 67 | def parse(self, file_path: Path) -> str: |
| 68 | logger.info(f"Reading JSON file from {file_path}.") |