hashbrown

UseImperativeJsonParserResult

The result object returned by the useImperativeJsonParser hook.

API

UseImperativeJsonParserResult
@typeOutput
error
ParserError | Error | undefined

The current parser or schema error, if any.

parseChunk
(chunk: string) => void

Apply a JSON chunk to the parser.

parserState
ParserState

The current streaming JSON parser state.

reset
() => void

Reset the parser to its initial state.

value
Output | undefined

The latest resolved value produced by the schema or parser state.