Re: Why Pass Java object in Twitter (& other) component

2013-12-16 Thread kraythe .
The only real reason not to put an object of type X in an exchange is the need to convert in and out of the type. I dont think POJO mapping all json is a useful thing but there are many canonical data formats that can accomplish the same thing (such as a map). The only thing you have to keep in min

Re: Why Pass Java object in Twitter (& other) component

2013-12-16 Thread Bruno Borges
Hi, The reason to keep twitter4j.Status as the payload is to avoid conversions on every project. In my experience, to read JSON data inside a Java application, developers tend to convert to a POJO-like object. So if this would be the common case, why not use the twitter4j.Status object? I'd say th

RE: Why Pass Java object in Twitter (& other) component

2013-12-10 Thread Goyal, Arpit
Hi Jan, Thanks for the explanation. So if I am writing camel component, I can use any library to return any object instead of standard XML / JSON / CSV format. Or if the external system returns in XML / JSON, pass on the data as it is in the 'Exchange' object. The question only comes because I

RE: Why Pass Java object in Twitter (& other) component

2013-12-10 Thread Goyal, Arpit
bject: Re: Why Pass Java object in Twitter (& other) component Hi Arpit, > Why not have standard behavior across camel components? Each component provides messages in the most efficient/generic/convenient way it is possible in given context. What kind of standard message format are you

Re: Why Pass Java object in Twitter (& other) component

2013-12-10 Thread Henryk Konsek
Hi Arpit, > Why not have standard behavior across camel components? Each component provides messages in the most efficient/generic/convenient way it is possible in given context. What kind of standard message format are you thinking of? JSON for example? Cheers. -- Henryk Konsek http://henryk