load_json
-
Description: Reads a JSON file. It uses
ujson
for faster reading compared to the standardjson
module. -
Parameters:
- path (
Union[Path, str]
): The path to the JSON file. - kwargs: Additional parameters for
ujson.load
.
- path (
-
Return Value:
- dict: The content of the JSON file.
-
Example:
import capybara as cb
path = '/path/to/your/json'
data = cb.load_json(path)
print(data)
# >>> {'key': 'value'}