Class JsonlTokenWriter

java.lang.Object
org.apache.juneau.marshall.jsonl.JsonlTokenWriter
All Implemented Interfaces:
Closeable, Flushable, AutoCloseable, RecordWriter, TokenWriter

public class JsonlTokenWriter extends Object implements TokenWriter
Reference implementation of the public TokenWriter surface for the JSONL / NDJSON format.

Wraps a JsonTokenWriter and appends a newline after every top-level value emit. The "top-level value" boundary is detected by tracking when an emit returns the cursor to depth == 0.

Notes:
  • This class is not thread safe.