NDJSONIterator
struct NDJSONIterator[target: StringSpan[ImmStaticOrigin] = StringSpan("cpu")]Lazy iterator over NDJSON lines.
Parses lines on-demand, reducing memory usage for large files.
Implements Movable
__init__
def __init__(out self, data: String) Initialize iterator with NDJSON data.
has_next
def has_next(self) -> Bool Check if there are more JSON values to parse.
next
def next(mut self) -> Value Parse and return the next JSON value.
Raises Error if no more values or parse error.
count_remaining
def count_remaining(self) -> Int Count remaining non-empty lines without consuming them.