jsoizo/kotlin-csv

Reuse config between reader and writer

AndreasVolkmann opened this issue · 1 comments

When reading/writing you usually want to use the same config, i.e. charset, quoteChar, etc.

It would be great if we could write this config once, and then reuse in both read and write.

Something like:

val context = CsvContext {
    charset = "UTF-8"
}

csvReader(context)...
csvWriter(context)...

Thank you for your feedback!

It's not bad idea, but actually the config of reader and writer are different. These have some common config elements, but many are different.
And I think there would be few use-cases to reuse config between reader and writer.