Bun

interface

JSONL.ParseChunkResult

interface ParseChunkResult

The result of Bun.JSONL.parseChunk.

  • done: boolean

    true if all input was consumed successfully. false if the input ends with an incomplete value or a parse error occurred.

  • error: null | SyntaxError

    A SyntaxError if a parse error occurred, otherwise null. Values parsed before the error are still available in values.

  • read: number

    How far into the input was consumed. When the input is a string, this is a character offset. When the input is a TypedArray, this is a byte offset. Use input.slice(read) or input.subarray(read) to get the unconsumed remainder.

  • values: unknown[]

    The successfully parsed JSON values.