zut.json.dump_json_temp

zut.json.dump_json_temp(data: Any, *, encoding='utf-8', indent: int | str | None = None, sort_keys=False, ensure_ascii=False, cls: type[JSONEncoder] = <class 'zut.json.ExtendedJSONEncoder'>)

Dump a Python object into a temporary file in JSON format and return a context manager on the path to the temporary file. The temporary file will be deleted when the context is exited.