JSONReaderOptions
Defined in: .build/typescript/packages/readers/src/json.ts:10
Properties
Section titled “Properties”streamingThreshold?
Section titled “streamingThreshold?”
optionalstreamingThreshold:number
Defined in: .build/typescript/packages/readers/src/json.ts:18
The threshold for using streaming mode. Give the approximate size of the JSON data in MB. Estimates character length by calculating: “(streamingThreshold * 1024 * 1024) / 2” and comparing against string.length Streaming mode avoids memory issues when parsing large JSON data. Set “undefined” to disable streaming or “0” to always use streaming.
Default
Section titled “Default”50 MBensureAscii?
Section titled “ensureAscii?”
optionalensureAscii:boolean
Defined in: .build/typescript/packages/readers/src/json.ts:26
Whether to ensure only ASCII characters. Converts non-ASCII characters to their unicode escape sequence.
Default
Section titled “Default”falseisJsonLines?
Section titled “isJsonLines?”
optionalisJsonLines:boolean
Defined in: .build/typescript/packages/readers/src/json.ts:35
Whether the JSON is in JSON Lines format. Split into lines, remove empty lines, parse each line as JSON. Note: Uses a custom streaming parser, most likely less robust than json-ext
Default
Section titled “Default”falsecleanJson?
Section titled “cleanJson?”
optionalcleanJson:boolean
Defined in: .build/typescript/packages/readers/src/json.ts:43
Whether to clean the JSON by filtering out structural characters ({}, [], and ,).
If set to false, it will just parse the JSON, not removing structural characters.
Default
Section titled “Default”truelevelsBack?
Section titled “levelsBack?”
optionallevelsBack:number
Defined in: .build/typescript/packages/readers/src/json.ts:51
Specifies how many levels up the JSON structure to include in the output. cleanJson will be ignored. If set to 0, all levels are included. If undefined, parses the entire JSON and treats each line as an embedding.
Default
Section titled “Default”undefinedcollapseLength?
Section titled “collapseLength?”
optionalcollapseLength:number
Defined in: .build/typescript/packages/readers/src/json.ts:59
The maximum length of JSON string representation to be collapsed into a single line.
Only applicable when levelsBack is set.
Default
Section titled “Default”undefinedlogger?
Section titled “logger?”
optionallogger:Logger
Defined in: .build/typescript/packages/readers/src/json.ts:65
A placeholder for a custom logging function.
Default
Section titled “Default”consoleLogger