Logo
Classes

JSONReader

Defined in: packages/readers/src/json.ts:161

A reader that reads JSON data and returns an array of Document objects. Supports various options to modify the output.

Extends

  • FileReader<Document>

Constructors

Constructor

new JSONReader(options): JSONReader

Defined in: packages/readers/src/json.ts:164

Parameters

options

JSONReaderOptions = {}

Returns

JSONReader

Overrides

FileReader<Document>.constructor

Methods

loadDataAsContent()

loadDataAsContent(content): Promise<Document<Metadata>[]>

Defined in: packages/readers/src/json.ts:204

Loads JSON data and returns an array of Document objects.

Parameters

content

Uint8Array

The JSON data as a Uint8Array.

Returns

Promise<Document<Metadata>[]>

A Promise that resolves to an array of Document objects.

Overrides

FileReader.loadDataAsContent

On this page