Spaces:
Running on Zero
Running on Zero
| from __future__ import annotations | |
| import json | |
| from pathlib import Path | |
| from typing import Any | |
| def write_json_file(payload: dict[str, Any], destination: Path) -> Path: | |
| destination.write_text( | |
| json.dumps(payload, ensure_ascii=False, indent=2), | |
| encoding="utf-8", | |
| ) | |
| return destination | |