CSV module
The CSV module contains functions for reading and writing CSV data.
Serialize
Signature: Serialize(input: sequence<{}>, delimiter: text) -> text
Serialize the given sequence of records to CSV that uses the given delimiter character to separate the CSV fields. The resulting data will always contain a header line as it first line.
Fields containing may be escaped with double quotation character as specified in RFC 4180.
Only sequences of records containing fields with Simple types (except binary) can be converted to CSV text. Using unsupported types in the serialization will return a empty text as its result.
Deserialize
Signature: Deserialize<T> (data: text, delimiter: text) -> T*
Deserialize the given CSV data using the specified delimiter into a sequence of records where the type of the record is specified by T. The deserialize function only supports CSV data where the first line is a header line containing a name that corresponds to each field in a line.
Last updated