v1.1.0
Configurable CSV Structures
You can now pass in a Config
instance to the initializers for any of the Encoder/Decoder/Serializer/Parser types to define what characters are used for separating rows and as cell delimiters.
let config = Config(separator: "|", delimiter: "'")
let parser = SyncParser(config: config)
let csv = """
'first_name'|'last_name'
'Jonathan ''Jon'''|'Kernney'
"""
let data = parser.parse(Array(csv.utf8))
print(data) // ["first_name": ["Jonathan 'Jon'"], "last_name": ["Kerrney"]]