JSONReader
Defined in: packages/readers/src/json.ts:165
A reader that reads JSON data and returns an array of Document objects. Supports various options to modify the output.
Extends
Section titled “Extends”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new JSONReader(
options):JSONReader
Defined in: packages/readers/src/json.ts:168
Parameters
Section titled “Parameters”options
Section titled “options”JSONReaderOptions = {}
Returns
Section titled “Returns”JSONReader
Overrides
Section titled “Overrides”Methods
Section titled “Methods”loadData()
Section titled “loadData()”Defined in: packages/core/src/schema/type.ts:65
Parameters
Section titled “Parameters”filePath
Section titled “filePath”string
Returns
Section titled “Returns”Inherited from
Section titled “Inherited from”addMetaData()
Section titled “addMetaData()”
staticaddMetaData(filePath): (doc,index) =>void
Defined in: packages/core/src/schema/type.ts:94
Parameters
Section titled “Parameters”filePath
Section titled “filePath”string
Returns
Section titled “Returns”(
doc,index):void
Parameters
Section titled “Parameters”number
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”loadDataAsContent()
Section titled “loadDataAsContent()”Defined in: packages/readers/src/json.ts:208
Loads JSON data and returns an array of Document objects.
Parameters
Section titled “Parameters”content
Section titled “content”Uint8Array
The JSON data as a Uint8Array.
Returns
Section titled “Returns”A Promise that resolves to an array of Document objects.