load_json
-
Description
Read a JSON file. Here,
ujson
is used for reading because it is much faster thanjson
. -
Parameters
- path (
Union[Path, str]
): The path to the JSON file. **kwargs
: Additional parameters forujson.load
.
- path (
-
Returns
- dict: The content of the JSON file.
-
Example
import docsaidkit as D
path = '/path/to/your/json'
data = D.load_json(path)
print(data)
# >>> {'key': 'value'}