Load data from JSON file Args: filepath: Path to the JSON file Returns: Loaded data
(filepath: str)
| 44 | |
| 45 | |
| 46 | def load_json(filepath: str) -> Union[Dict, List]: |
| 47 | """ |
| 48 | Load data from JSON file |
| 49 | |
| 50 | Args: |
| 51 | filepath: Path to the JSON file |
| 52 | |
| 53 | Returns: |
| 54 | Loaded data |
| 55 | """ |
| 56 | with open(filepath, 'r', encoding='utf-8') as f: |
| 57 | return json.load(f) |
| 58 | |
| 59 | |
| 60 |
no outgoing calls
no test coverage detected