Save data as JSON to file.
(data: Any, filepath: str)
| 17 | |
| 18 | @staticmethod |
| 19 | def save_json(data: Any, filepath: str) -> None: |
| 20 | """Save data as JSON to file.""" |
| 21 | with open(filepath, 'w', encoding='utf-8') as f: |
| 22 | json.dump(data, f, indent=4, ensure_ascii=False) |
| 23 | |
| 24 | @staticmethod |
| 25 | def load_json(filepath: str) -> Optional[Dict[str, Any]]: |
no outgoing calls
no test coverage detected