![]() |
Qore json Module 1.11.0
|
Iterator for reading NDJSON data from an input stream. More...
#include <NdjsonIterator.qc.dox.h>
Inherits AbstractIterator.
Public Member Methods | |
| void | constructor (Qore::InputStream input_stream, soft< hash< NdjsonIteratorOptions > > options) |
| Creates the iterator from an input stream. | |
| auto | getValue () |
| Returns the current JSON value. | |
| bool | valid () |
| Returns True if the iterator is valid. | |
| int | getLineNumber () |
| Returns the current line number (1-based) | |
Private Attributes | |
| Qore::StreamReader | reader |
| The input stream. | |
| auto | current_value |
| Current parsed value. | |
| hash< NdjsonIteratorOptions > | opts |
| Options for the iterator. | |
Iterator for reading NDJSON data from an input stream.
This class provides an iterator interface for reading NDJSON formatted data from an input stream, enabling memory-efficient processing of large files.
| void NdjsonDataProvider::InputStreamNdjsonIterator::constructor | ( | Qore::InputStream | input_stream, |
| soft< hash< NdjsonIteratorOptions > > | options | ||
| ) |
Creates the iterator from an input stream.
| input_stream | the input stream to read from |
| options | iterator options |
| auto NdjsonDataProvider::InputStreamNdjsonIterator::getValue | ( | ) |
Returns the current JSON value.
| ITERATOR-ERROR | if the iterator is not valid |