Re: Content Based Routing with Camel

2013-12-09 Thread James Carman
He would need to use a Predicate for CBR. Either way, it'd be easy to do, as you pointed out, since it's just a library. :) Or, if the destination can be "calculated" based on something in your JSON (using an expression), you could do something like this: from(...).deserialize(...).recipientList

Re: Content Based Routing with Camel

2013-12-09 Thread Christian Posta
If you're set on JsonPath, you can do so in a POJO or processor as it's just a library: http://code.google.com/p/json-path/ On Mon, Dec 9, 2013 at 1:57 PM, Henryk Konsek wrote: > Hi guys, > >> Perhaps you can deserialize the object(s) first before doing CBR >> (using a simple expression)? > > Th

Re: Content Based Routing with Camel

2013-12-09 Thread Henryk Konsek
Hi guys, > Perhaps you can deserialize the object(s) first before doing CBR > (using a simple expression)? This is very good suggestion, James. To make it a little more concrete: from(...). unmarshal().json(JsonLibrary.Gson, Map.class). choice(). when().simple("${body[invoices][lates

Re: Content Based Routing with Camel

2013-12-09 Thread kraythe .
Easiest way is to deserialize with Jackson2 into a JSON Tree and then navigate the tree to get the info. Means you dont need a pojo or mapping but can still fetch the data without resortign to string parsing. I dont know how mature JSONPathc is anyway. We will see if it holds any benefit over going

Re: Content Based Routing with Camel

2013-12-09 Thread madusanka
I have to detect what type they are first and then route to the appropriate service provider. I was wondering if JSONPath is supported in early versions of Camel ? -- View this message in context: http://camel.465427.n5.nabble.com/Content-Based-Routing-with-Camel-tp5744495p5744508.html Sent fro

Re: Content Based Routing with Camel

2013-12-09 Thread James Carman
Perhaps you can deserialize the object(s) first before doing CBR (using a simple expression)? Or, do you have to detect what type they are first and then route to the appropriate deserializer? On Mon, Dec 9, 2013 at 3:15 AM, madusanka wrote: > Hi, > > I know that JSONPath component will be avail