Re: csv data format with ordered maps
Ah okay that is unfortunately in the commons-csv implementation. You
would need to report this to them.
Sadly there is no way to get the mapping on CSVRecord so we can get
the column headers (we could maybe do some reflection as workaround).
On Wed, Mar 7, 2018 at 3:29 PM, Dennis Holunder <dennisholu@xxxxxxxxx> wrote:
> in camel-csv component
> CsvRecordConverters.mapConverter().convertRecord(CSVRecord record)
> it calls CSVRecord.toMap() which returns HashMap but CSVRecord is in
> would be great if you could change it.
> 2018-03-07 13:13 GMT+01:00 Claus Ibsen-2 [via Camel]
>> Can you point to where it creates HashMap, maybe we can change that to
>> On Wed, Mar 7, 2018 at 12:08 PM, Dennis Holunder <[hidden email]> wrote:
>>> I need a CSV record mapper which would use maps, but ordered ones,
>>> because I need the name of the first header field. Current
>>> implementation creates HashMaps, where the original order is lost.
>>> I tried to implement my own CsvRecordConverter to produce ordered map,
>>> but the interface is not public. This is not expected,
>>> CsvDataFormat.setRecordConverter has a public setter accepting this
>>> Any workarounds?
>> Claus Ibsen
>> http://davsclaus.com @davsclaus
>> Camel in Action 2: https://www.manning.com/ibsen2
>> If you reply to this email, your message will be added to the discussion
>> To unsubscribe from Camel, click here.
Camel in Action 2: https://www.manning.com/ibsen2