camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: How to get a specific value from a json string?
Date Thu, 02 May 2013 08:25:47 GMT

Yeah I would like to see a json expression language built-in out of
the box in Camel.

This library seems compelling

You can also find some talks about json expression libraries here

Though you can use the Camel json data format (jackson, gson etc)

And turn the data into a Map structure, and then get the value from
the map afterwards. For that you can use simple, mvel, ognl languages
to grab the field.

Though I would like that json-path library out of the box as you can
then do a single expression to grab the field.
Though it may only work for expressions. Would be nice for predicates
as well, so you can use it in content based routers / filters etc.

On Thu, May 2, 2013 at 10:12 AM, <> wrote:
> Hi everyone,
> I came across a simple problem and I need some help.
> I get a json string from a jms, and I want to get a specific value from the
> json string.
> how can I do it in blueprint file?
> For example, the json from jms queue "FEATURES.JSON" is
>  {id:"123",
> name:"test",
> value:"dfsa"}
> I want to get the name and pass it to the queue "RETURN"
> how can I achieve it?
>  <from uri="jms:queue:FEATURES.JSON" />
> some  code here
>  <to uri="jms:queue:RETURN"/>
> Thank you!

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message