Skip to content

Add a configuration strategy for Boolean encoding #2

@scottmatthewman

Description

@scottmatthewman

Booleans are currently configured to output as the text strings true or false.

Add a new configuration parameter to CSVEncoderConfiguration to support different styles of encoding:

encoding type True encodes as False encodes as
.trueFalse (default) true false
.trueFalseUppercase TRUE FALSE
.yesNo yes no
.yesNoUppercase YES NO
.integer 1 0

Expected work to do:

  • Add BoolEncodingStrategy enum to CSVEncoderConfiguration with all options documented
  • Add boolEncodingStrategy property to CSVEncoderConguration
  • Update CSVEncoderConfiguration.default to use the default [^1]
  • Update Bool.encode() method to amend output based on configuration strategy
  • Add unit tests for each strategy
  • Review and verify generated DocC documentation

Metadata

Metadata

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions