torchoutil.pyoutil.json module

dump_json(
data: Any,
fpath: str | Path | None = None,
*,
overwrite: bool = True,
make_parents: bool = True,
indent: int | None = 4,
ensure_ascii: bool = False,
**json_dump_kwds,
) str[source]

Dump content to JSON format.

load_json(
fpath: str | Path,
**json_load_kwds,
) Any[source]