MCPcopy Create free account
hub / github.com/buger/jsonparser / ReaderParser

Struct ReaderParser

reader_parser.go:23–32  ·  view source on GitHub ↗

ReaderParser provides path-based access to a JSON stream. It is intended for one operation per stream: call Get, GetString, or ArrayEach after creating the parser. ReaderParser is not safe for concurrent use. The sliding window is bounded by Config.MaxBufferSize while skipping input. A returned val

Source from the content-addressed store, hash-verified

21// complete byte slice must remain available to the caller.
22// SYS-REQ-116
23type ReaderParser struct {
24 reader io.Reader
25 buf []byte
26 bufStart int64
27 pos int
28 config Config
29
30 readErr error
31 emptyReads int
32}
33
34// NewReaderParser creates a streaming parser. If opts contains a Config, the
35// first Config controls lenient parsing and the sliding-window size.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected