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
| 21 | // complete byte slice must remain available to the caller. |
| 22 | // SYS-REQ-116 |
| 23 | type 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. |
nothing calls this directly
no outgoing calls
no test coverage detected