sv-core-0.2: Encode and decode separated values (CSV, PSV, ...)

Copyright(C) CSIRO 2017-2018
LicenseBSD3
MaintainerGeorge Wilson <george.wilson@data61.csiro.au>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe
LanguageHaskell2010

Data.Sv.Encode.Options

Description

Options to configure encoding

Synopsis

Documentation

data EncodeOptions Source #

These are options to configure encoding. A default is provided as defaultEncodeOptions.

Constructors

EncodeOptions 

Fields

class HasSeparator c where Source #

Classy lens for Separator

Minimal complete definition

separator

data Quoting Source #

Should the output file have quotes around every value, or only when they are required?

Beware the Never constructor. It can construct malformed CSV files if there are fields containing quotes, newlines, or separators. It is the fastest option though, so you might like to use it if you're sure none of your encoded data will include those characters.

Constructors

Always 
AsNeeded 
Never 

defaultEncodeOptions :: EncodeOptions Source #

The default options for encoding.

The default is a CSV file with quotes when necessary, LF lines, and no terminating newline.