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

Copyright(C) CSIRO 2017-2018
LicenseBSD3
MaintainerGeorge Wilson <george.wilson@data61.csiro.au>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
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

  • _encodeSeparator :: Separator

    Are your values separated by commas, tabs, or something else? Default: comma

  • _spacingBefore :: Spaces

    Between a comma and the next value, would you like some spacing? Default: no spacing

  • _spacingAfter :: Spaces

    Between a value and the next comma, would you like some spacing? Default: no spacing

  • _quote :: Maybe Quote

    Would you like quotes around your values? If so, double quotes or single? Deafult: Double quotes

  • _newline :: Newline

    What kind of newline would you like? Default: CRLF

  • _terminalNewline :: Bool

    Should the file be terminated with a newline? Default: No

defaultEncodeOptions :: EncodeOptions Source #

The default options for encoding.

The default is a CSV file with double-quotes, CRLF lines, no spacing around fields, and no terminating newline.