![]() |
Qore json Module 1.11.0
|
Iterator for reading NDJSON (Newline Delimited JSON) data from a string. More...
#include <NdjsonIterator.qc.dox.h>
Inherits AbstractIterator.
Public Member Methods | |
| 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) | |
| void | reset () |
| Resets the iterator to the beginning. | |
Private Attributes | |
| list< string > | lines |
| The list of lines to iterate over. | |
| auto | current_value |
| Current parsed value. | |
| hash< NdjsonIteratorOptions > | opts |
| Options for the iterator. | |
Iterator for reading NDJSON (Newline Delimited JSON) data from a string.
This class provides an iterator interface for reading NDJSON formatted data. Each call to next() advances to the next JSON line, and getValue() returns the parsed JSON value.
| auto NdjsonDataProvider::NdjsonIterator::getValue | ( | ) |
Returns the current JSON value.
| ITERATOR-ERROR | if the iterator is not valid |