Read and write CSV files row-by-row or through Swift's Codable interface.
\r\n
and \n
) at the same time.
CSVReader
will end a row when one of the row delimiters is encountered. Use just one row delimiter for better performance.CSVReader
and CSVDecoder
are now "stricter" while parsing CSV data.
Now errors are thrown when encountering ill-formed rows, instead of just finishing the parsing process (#34).CSVReader
and CSVDecoder
ignore empty lines.
Usually encountered at the end of a file.CSVWriter
encoder is faster for UTF8 encodings.CSVEncoder
and CSVDecoder
have experienced major speed ups, due to drops on unnecessary retains/releases.decodeNil()
behavior to more closely follow the documentation.decodeIfPresent
can now be safely used.CSVEncoder
and CSVDecoder
now support lazy functionality.README
has been expanded with more examples.CSVEncoder
/CSVDecoder
adopts TopLevelEncoder
/TopLevelDecoder
when Combine is present.CSVReader
and CSVDecoder
now also accept InputStream
s.
The introduction of this feature allows easier usage of CodableCSV
by Command-line applications reading information from the .standardInput
(i.e. stdin
).CodableCSV
functions are now CSVError
s.
All CSVError
s include the failure reason and provide help cues to avoid said problem.CSVDecoder
now supports on demand (lazy) decoding.CSVEncoder
has finally been implemented.
Full support for Codable
has been achieved. You can now use keyed, unkeyed and single value containers when neeeded.CSVEncoder
and CSVDecoder
support for different buffering strategies.
This translates in less memory usage for sequential or assembled runs.CSVReader
/CSVWriter
API have been renamed to match CSVEncoder
/CSVDecoder
API.Data
, String
, and files (through URL
s).CSVReader
and CSVWriter
for greater performance.CSVError
adopting SE-112 protocols for easier debugging.Decoder
fully immutable.CSVReader
, CSVWriter
, and CSVDecoder
.