Documentation
¶
Overview ¶
Package csvnode provides the CSV node implementation (Node-RED type ID "csv" - named csvnode here to avoid shadowing the imported encoding/csv package within this file).
CSV converts msg.payload bidirectionally based on its current type: a string is parsed into an array of rows, an array is serialized into a CSV string.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Node ¶
type Node struct {
// HasHeaderRow, when parsing, treats the first row as field names and
// produces an array of objects instead of an array of arrays; when
// serializing, writes Columns (or an object's keys) as a header row.
HasHeaderRow bool
// Columns, if set, is used as parse headers (instead of the first row)
// or as the explicit column order when serializing. If unset when
// serializing objects, keys are taken from the first row and sorted for
// determinism (map iteration order is not stable).
Columns []string
// Delimiter is a single character, default ",".
Delimiter string
}
Node holds a CSV node's configuration.
Click to show internal directories.
Click to hide internal directories.