![]() |
Qore json Module 1.11.0
|
Creates NDJSON output as a string. More...
#include <NdjsonWriter.qc.dox.h>
Public Member Methods | |
| void | constructor (soft< hash< NdjsonWriterOptions > > options) |
| Creates the string writer. | |
| string | getString () |
| Returns the NDJSON string. | |
| void | clear () |
| Clears the internal buffer and resets the writer. | |
Public Member Methods inherited from NdjsonDataProvider::NdjsonWriter | |
| void | constructor (Qore::OutputStream output_stream, soft< hash< NdjsonWriterOptions > > options) |
| Creates the writer with an output stream. | |
| int | write (auto value) |
| Writes a JSON value as a line. | |
| int | writeAll (list< auto > values) |
| Writes multiple JSON values as lines. | |
| int | getRecordsWritten () |
| Returns the number of records written. | |
Private Attributes | |
| StringOutputStream | sos |
| The string output stream. | |
Private Attributes inherited from NdjsonDataProvider::NdjsonWriter | |
| Qore::StreamWriter | writer |
| The output stream. | |
| string | line_ending |
| Line ending string. | |
| hash< NdjsonWriterOptions > | opts |
| Writer options. | |
Creates NDJSON output as a string.
This is a convenience class that writes NDJSON to an internal string buffer.
| void NdjsonDataProvider::NdjsonStringWriter::constructor | ( | soft< hash< NdjsonWriterOptions > > | options | ) |
Creates the string writer.
| options | writer options |