Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decoder ¶
type Decoder struct {
HasHeader bool // When true, treat the first record as a header
RecordsProduceObjects bool // When false, produce an array for each record, else an object
// contains filtered or unexported fields
}
A Decoder reads CSV input and streams it into a JSON stream.
func NewDecoder ¶
NewDecoder sets up a new Decoder instance to read from the given input.
func (*Decoder) Produce ¶
Produce reads a stream of CSV records, until it runs out of input or encounters invalid CSV, in which case it will return an error
func (*Decoder) SetFieldNames ¶
SetFieldNames sets the field names for records. Should be called before Produce.
Click to show internal directories.
Click to hide internal directories.