Copyright | © 2015 Patryk Zadarnowski <pat@jantar.org> |
---|---|
License | BSD3 |
Maintainer | pat@jantar.org |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
Pipes.CSV.Decoder
Description
Streaming CSV file decoder compliant with RFC 4180. It follows the RFC 4180 quite strictly, with the following minor extensions:
- arbitrary characters, including ASCII control codes and non-ASCII code points are accepted anywhere in the input,
- CR and LF are accepted as row separators in addition to the standard CR+LF,
- rows can have varying number of fields,
- within quoted field, a quote character that is not followed by another quote, comma or line break is accepted literally.
- decodeCSV :: Monad m => Pipe ByteString.ByteString (Cell ByteString.ByteString) m ()
- decodeLazyCSV :: Monad m => Pipe Lazy.ByteString (Cell ByteString.ByteString) m ()
Documentation
decodeCSV :: Monad m => Pipe ByteString.ByteString (Cell ByteString.ByteString) m () Source
An infinite pipe that parses a fragmented strict representation of of a CSV file into a stream of cells.
decodeLazyCSV :: Monad m => Pipe Lazy.ByteString (Cell ByteString.ByteString) m () Source
An infinite pipe that parses a fragmented lazy representation of of a CSV file into a stream of cells.