(self, filepath: str)
| 458 | return json.dumps(self.results, default=self.encode) |
| 459 | |
| 460 | def to_file(self, filepath: str) -> None: |
| 461 | import json |
| 462 | |
| 463 | with open(filepath, "w", encoding="utf-8") as outfile: |
| 464 | return json.dump(self.results, outfile, ensure_ascii=False, default=self.encode) |
| 465 | |
| 466 | def encode(self, obj): |
| 467 | return str(obj) |