You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "c.spiegel" <c....@waldmann.com> on 2011/09/13 15:22:33 UTC

bindy: different behavior between marshal and unmarshal with pipe separator '|'

Hi, I need to marshal and unmarshal CSV files with pipe as separator.

If a annotate my model object with @CsvRecord(separator="\\|") as mentioned
in docs, the unmarshal process works fine. But if I try to marshal from this
model object to CSV file the resulting separator is just the backslash
character \ !!!

If i change the annotation to @CsvRecord(separator="|") or
@CsvRecord(separator="||") the marshal process works fine with pipe as
separator, but the unmarshal process fails.

Is this a bug in camel 2.8.0 bindy component which I'm using?


--
View this message in context: http://camel.465427.n5.nabble.com/bindy-different-behavior-between-marshal-and-unmarshal-with-pipe-separator-tp4798488p4798488.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: bindy: different behavior between marshal and unmarshal with pipe separator '|'

Posted by ozzy81 <oz...@gmail.com>.
The escape characters are still added into the Header Columns when
marshalling back the object.
e.g.

Separator = \\|

Output:
Header 1\|Header2\|...

Version:2.13.2



--
View this message in context: http://camel.465427.n5.nabble.com/bindy-different-behavior-between-marshal-and-unmarshal-with-pipe-separator-tp4798488p5759363.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: bindy: different behavior between marshal and unmarshal with pipe separator '|'

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yes its a bug. I have created a ticket to track this
https://issues.apache.org/jira/browse/CAMEL-4446


On Tue, Sep 13, 2011 at 3:22 PM, c.spiegel <c....@waldmann.com> wrote:
> Hi, I need to marshal and unmarshal CSV files with pipe as separator.
>
> If a annotate my model object with @CsvRecord(separator="\\|") as mentioned
> in docs, the unmarshal process works fine. But if I try to marshal from this
> model object to CSV file the resulting separator is just the backslash
> character \ !!!
>
> If i change the annotation to @CsvRecord(separator="|") or
> @CsvRecord(separator="||") the marshal process works fine with pipe as
> separator, but the unmarshal process fails.
>
> Is this a bug in camel 2.8.0 bindy component which I'm using?
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/bindy-different-behavior-between-marshal-and-unmarshal-with-pipe-separator-tp4798488p4798488.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/