I guess the more appropriate question is how do I convert BSON into JSON.
Timestamp is not been converted into JSON is the problem.
Gordon
--
View this message in context:
http://camel.465427.n5.nabble.com/how-to-read-json-in-a-file-and-use-jsonpath-tp5759546p5759562.html
Sent from the Camel -
Claus,
It looks like the problem with my json.
"ts": Timestamp(1415124334, 1),
Once it is removed I had no problems.
The json file is from Mongodb oplog.
It is used to synchronize data between Mongodb and Redis.
Do you have suggestions for dealing with that name: value pair?
Maybe something al
Hi Gordon
I don't think your json is valid[1], once that's sorted try this unit
test[2] which shows how to
achieve what you want.
[1] http://jsonlint.com/
The following works, I added some quotes, you'll have to check if your
format is supposed to be supported.
{
"ts": "Timestamp(1415124334, 1)
Claus,
I tried that approach first and did not work.
I took the maven java dsl archetype and changed the route to point to the
.json file and then added the additional route.
Do I need to add any other configurations or libraries?
Gordon
--
View this message in context:
http://camel.465427.n5.n
I guess you should do something a like
http://camel.apache.org/jsonpath
.when().jsonpath("$.op == 'i'")
On Mon, Nov 24, 2014 at 5:36 PM, gmh wrote:
> All,
> In my sample code I am reading a json file and doing a jsonpath to do
> content based routing.
>
> Here is the simple route
> from("file