NewReaderParser creates a streaming parser. If opts contains a Config, the first Config controls lenient parsing and the sliding-window size. SYS-REQ-116
(r io.Reader, opts ...Config)
| 35 | // first Config controls lenient parsing and the sliding-window size. |
| 36 | // SYS-REQ-116 |
| 37 | func NewReaderParser(r io.Reader, opts ...Config) *ReaderParser { |
| 38 | config := DefaultConfig |
| 39 | if len(opts) > 0 { |
| 40 | config = opts[0] |
| 41 | } |
| 42 | return &ReaderParser{ |
| 43 | reader: r, |
| 44 | config: config, |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // Get returns the value addressed by keys without loading the whole document. |
| 49 | // As with the package-level Get, string values are returned without quotes but |
no outgoing calls