> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# JSON Reader

> Convert JSON files into knowledge base documents with JSONReader.

`JSONReader` creates one source document for a top-level object or each item in a top-level array, then applies fixed-size chunking.

```python json_reader.py theme={null}
import json
from pathlib import Path

from agno.knowledge.reader.json_reader import JSONReader

reader = JSONReader()

json_path = Path("tmp/test.json")
json_path.parent.mkdir(parents=True, exist_ok=True)
json_path.write_text(
    json.dumps([{"name": "Jordan"}, {"name": "Taylor"}]),
    encoding="utf-8",
)

documents = reader.read(json_path)
for document in documents:
    print(document.meta_data["page"], document.content)
```

## Run the Reader

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno
    ```
  </Step>

  <Step title="Run the script">
    ```bash theme={null}
    python json_reader.py
    ```
  </Step>
</Steps>

## Reader Parameters

<Snippet file="json-reader-reference.mdx" />

<Note>
  Use a top-level object or array. In v2.7.2, number, boolean, and null roots raise a `TypeError`, and a string root splits into one document per character.
</Note>

`JSONReader.async_read()` runs the synchronous reader in a worker thread.

## Next Steps

| Task                          | Guide                                                                   |
| ----------------------------- | ----------------------------------------------------------------------- |
| Configure fixed-size chunking | [Fixed-Size Chunking](/knowledge/concepts/chunking/fixed-size-chunking) |
| Inspect the complete API      | [JSON Reader Reference](/reference/knowledge/reader/json)               |
| Compare available readers     | [Readers Overview](/knowledge/concepts/readers/overview)                |
