Gert,

You are right. We receive a Java Object List

                // Extract the messages from the body
                messages = (List<String>) body;

                for (Iterator itermessages = messages.iterator(); itermessages
                                .hasNext();) {
                        
                        // Get each message
                        message = (String[]) itermessages.next();

                        for (Iterator itermessage = messages.iterator(); 
itermessage
                                        .hasNext();) {
                                
                                // Split the content of the message into field
                                field = (String[]) itermessage.next();




Gert Vanthienen wrote:
> 
> Charles,
> 
> I think the CSV file is transformed into a Java List object, which might 
> be the reason why you see the [ ] in there when printing the message body.
> 
> Gert
> 
> cmoulliard wrote:
>> Hi,
>>
>> Why the CSVDataFormat add those characters from and after a CSV line '['
>> ']'
>> ? 
>>
>> ex of body message displaying those characters.
>> [[1, bank1, 10, 20, sale], [2, bank2, 10, 5, sale], [3, bank3, 1000,
>> 2000,
>> buy], ...
>>
>> Remark : the file parsed using CSVDataformat is placed as a message in a
>> queue.
>>
>>        from("file:///c:/temp/test?noop=true")
>>         .unmarshal().csv()
>>         .to("test-jms:queue:test.queue");
>>
>> May I suggest you to avoid the generation of such characters because
>> those
>> tags must be remove during the process to map CSV line content to a POJO
>> !
>>
>> Is it possible to have CSV annotations (like it is possible in the ETL
>> example with XML file) in order to map the content of a CSV line to a
>> POJO ?
>>
>> regards,
>>
>> Charles
>>   
> 
> 
> 
> -----
> ---
> Gert Vanthienen
> http://www.anova.be
> 

-- 
View this message in context: 
http://www.nabble.com/Why-CsvDataFormat-generate-character-%27-%27---%27-%27---CSV-annotations-tp16120155s22882p16197717.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to