---
title: '📃 JSON'
---

To add any json file, use the `JsonLoader`.
Headers are included for each line, so for example if you have a json like `{"age": 18}`, then it will be added as `age: 18`.

## Usage

<CodeGroup>

```ts Example
import { RAGApplicationBuilder, JsonLoader } from '@llm-tools/embedjs';
import { OpenAiEmbeddings } from '@llm-tools/embedjs-openai';
import { HNSWDb } from '@llm-tools/embedjs-hnswlib';

const app = await new RAGApplicationBuilder()
.setModel(SIMPLE_MODELS.OPENAI_GPT4_O)
.setEmbeddingModel(new OpenAiEmbeddings())
.setVectorDatabase(new HNSWDb())
.build();

app.addLoader(new JsonLoader({ object: {...} }))
```
</CodeGroup>


