You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ozzy81 <oz...@gmail.com> on 2014/11/20 16:20:55 UTC
Bindy: using a multi-character separator for marshalling
Hello,
We have a requirement to use a double pipe separator to decode a CSV from
the customer (||). I was able to get the unmarshalling to work by using
\\|\\| as the separator, and it works great.
The problem arises while marshalling the object back into a CSV.
The headers are separated by \|\| and the contents by a single pipe |
e.g.
Header 1\|\|Header2\|\|...
prop1|prop2|...
Looking at the sources, IMHO this is in the unbind method where the
separator is converted from String to char.
char separator = ConverterUtils.getCharDelimiter(this.getSeparator());
Is it possible to use a multi-character separator in Bindy?
Thanks a lot in advance.
--
View this message in context: http://camel.465427.n5.nabble.com/Bindy-using-a-multi-character-separator-for-marshalling-tp5759364.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Bindy: using a multi-character separator for marshalling
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
No its single char based currently.
On Thu, Nov 20, 2014 at 4:20 PM, ozzy81 <oz...@gmail.com> wrote:
> Hello,
>
> We have a requirement to use a double pipe separator to decode a CSV from
> the customer (||). I was able to get the unmarshalling to work by using
> \\|\\| as the separator, and it works great.
>
> The problem arises while marshalling the object back into a CSV.
>
> The headers are separated by \|\| and the contents by a single pipe |
>
> e.g.
> Header 1\|\|Header2\|\|...
> prop1|prop2|...
>
> Looking at the sources, IMHO this is in the unbind method where the
> separator is converted from String to char.
> char separator = ConverterUtils.getCharDelimiter(this.getSeparator());
>
> Is it possible to use a multi-character separator in Bindy?
>
> Thanks a lot in advance.
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Bindy-using-a-multi-character-separator-for-marshalling-tp5759364.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/