Documentation
¶
Overview ¶
Package ndjson provides NDJSON (newline-delimited JSON) import and export for the pulse I/O pipeline.
Package ndjson provides NDJSON (newline-delimited JSON) import and export for the pulse I/O pipeline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader reads NDJSON data from a byte source. Each line is one JSON object.
func NewReaderFromBytes ¶
NewReaderFromBytes creates an NDJSON reader from raw bytes.
func (*Reader) ReadHeader ¶
ReadHeader returns column names derived from the keys of the first JSON object.
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer writes NDJSON data to a buffer.
func NewWriterToBuffer ¶
func NewWriterToBuffer() *Writer
NewWriterToBuffer creates an NDJSON writer that writes to an internal buffer.
func (*Writer) WriteHeader ¶
WriteHeader records the column names for use in subsequent WriteRow calls. NDJSON has no header line; the columns are used as keys in each JSON object.