Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /Lampx83_LakeFlow /backend /src /lakeflow /common /jsonio.py
| import json | |
| from pathlib import Path | |
| from typing import Any | |
| def read_json(path: Path) -> Any: | |
| if not path.exists(): | |
| raise FileNotFoundError(f"JSON file not found: {path}") | |
| with path.open("r", encoding="utf-8") as f: | |
| return json.load(f) | |
| def write_json(path: Path, data: Any, indent: int = 2) -> None: | |
| path.parent.mkdir(parents=True, exist_ok=True) | |
| with path.open("w", encoding="utf-8") as f: | |
| json.dump(data, f, ensure_ascii=False, indent=indent) | |
Xet Storage Details
- Size:
- 490 Bytes
- Xet hash:
- 75f01cdeb7037a730f698358fe7818dcc33c08fd8b1a3405f94be27b67a2b346
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.