load_json
-
Description: Reads a JSON file. It uses
ujsonfor faster reading compared to the standardjsonmodule. -
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'}