(file_path: Path)
| 83 | return lines |
| 84 | |
| 85 | def parse(file_path: Path) -> str: |
| 86 | logger.info(f"Reading JSON Lines file from {file_path}.") |
| 87 | with open(file_path, "r",encoding='utf-8') as f: |
| 88 | lines = [json.loads(line) for line in f] |
| 89 | text = '\n'.join([str(line) for line in lines]) |
| 90 | return text |
| 91 | |
| 92 | class XMLReader(Reader): |
| 93 | def parse(self, file_path: Path) -> str: |