LlamaIndex Readers Integration: Json
Overview
JSON Reader reads JSON documents with options to help extract relationships between nodes. It provides functionalities to control the depth of JSON traversal, collapse long JSON fragments, and clean JSON structures.
Installation
You can install JSON Reader via pip:
pip install llama-index-readers-json
Usage
from llama_index.readers.json import JSONReader
reader = JSONReader(
levels_back="<Levels Back>",
collapse_length="<Collapse Length>",
ensure_ascii="<Ensure ASCII>",
is_jsonl="<Is JSONL>",
clean_json="<Clean JSON>",
)
documents = reader.load_data(input_file="<Input File>", extra_info={})
This loader is designed to be used as a way to load data into
LlamaIndex and/or subsequently
used as a Tool in a LangChain Agent.