Convert a stream of characters (in chunks) to a sequence of path/value pairs

Constructors

  • Convert a stream of bytes (in chunks) into a sequence of path/value pairs

    Parameters

    • Optionaloptions: { includes?: string; maxDepth?: number; startingPath?: JSONPathType } = {}
      • Optionalincludes?: string

        Expression using the includes syntax

      • OptionalmaxDepth?: number

        Max parsing depth

      • OptionalstartingPath?: JSONPathType

        The parser will consider this path as it is initial (useful to resume)

    Returns default

Properties

currentDepthInObject: number
currentPath: Path
matcher: MatcherContainer
state: string
stringBuffer: Uint8Array<ArrayBuffer>
tokenizer: StreamJSONTokenizer

Methods

  • Check if there are no data to extract left considering the "includes" parameter

    Returns boolean

  • Parse a json or json fragment from a buffer, split in chunks (ArrayBuffers) and yields a sequence of path/value pairs It also yields the starting and ending byte of each value

    Parameters

    • chunk: Uint8Array

      an arraybuffer that is a chunk of a stream

    Returns Iterable<[JSONPathType, JSONValueType, number, number]>

    • path, value, byte start, and byte end when the value is in the buffer