load_json()

audeer.load_json(file)[source]

Load object from JSON file.

Parameters:

file (str | bytes) – path to JSON file

Return type:

object

Returns:

object stored in JSON file

Examples

>>> file = audeer.path("test.json")
>>> audeer.save_json(file, {"a": 1})
>>> audeer.load_json(file)
{'a': 1}