Skip to content

json

JsonDataLoader(path)

Bases: Dataset

DataLoader for JSON files.

Initialize the JsonDataLoader.

Parameters:

Name Type Description Default
path str | Path

Path to the JSON file.

required
Source code in src/flowcean/environments/json.py
12
13
14
15
16
17
18
19
def __init__(self, path: str | Path) -> None:
    """Initialize the JsonDataLoader.

    Args:
        path: Path to the JSON file.
    """
    data = pl.read_json(path)
    super().__init__(data)