Skip to content

json_loader

JsonLoader

Bases: BaseFileLoader[JsonArtifact]

Source code in griptape/loaders/json_loader.py
@define
class JsonLoader(BaseFileLoader[JsonArtifact]):
    def parse(self, data: bytes) -> JsonArtifact:
        return JsonArtifact(json.loads(data), encoding=self.encoding)

parse(data)

Source code in griptape/loaders/json_loader.py
def parse(self, data: bytes) -> JsonArtifact:
    return JsonArtifact(json.loads(data), encoding=self.encoding)