torchoutil
Github
PyPI
Github
PyPI
Quick search
torchoutil
torchoutil package
Docs
»
torchoutil
»
torchoutil package
»
torchoutil.serialization package
»
torchoutil.serialization.json module
← torchoutil.serialization.hdf module
torchoutil.serialization.load_fn module →
torchoutil.serialization.json module
¶
dump_json
(
data
:
Any
,
fpath
:
str
|
Path
|
None
=
None
,
*
,
overwrite
:
bool
=
True
,
make_parents
:
bool
=
True
,
to_builtins
:
bool
=
False
,
indent
:
int
|
None
=
4
,
ensure_ascii
:
bool
=
False
,
**
json_dump_kwds
,
)
→
str
[source]
¶
Dump content to JSON format into a string and/or file.
to_json
(
data
:
Any
,
fpath
:
str
|
Path
|
None
=
None
,
*
,
overwrite
:
bool
=
True
,
make_parents
:
bool
=
True
,
to_builtins
:
bool
=
False
,
indent
:
int
|
None
=
4
,
ensure_ascii
:
bool
=
False
,
**
json_dump_kwds
,
)
→
str
[source]
¶
Dump content to JSON format into a string and/or file.
← torchoutil.serialization.hdf module
torchoutil.serialization.load_fn module →