You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by catshout <ge...@web.de> on 2015/09/22 17:02:31 UTC

DSL route type conversion from InputStream to JSON

Dear all,

I've created a route like (snippet) ..



The http writes an InputStream and I want to convert the contained JSON
string into XML. I'm getting an error ..

Body                [Body is instance of java.io.InputStream]
]

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
net.sf.json.JSONException: Invalid JSON String

I've read something about Camel TypeConverter and wonder if there's a
pre-defined standard TypeConverter to convert InputStream into a String?

Maybe there's even another way to handle this?

P.S. The route works fine with a plain JSON String.

Any hints are highly appreciated.

Best
- Gerald



--
View this message in context: http://camel.465427.n5.nabble.com/DSL-route-type-conversion-from-InputStream-to-JSON-tp5771816.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: DSL route type conversion from InputStream to JSON

Posted by catshout <ge...@web.de>.
I did some more research, this line solves the conversion



Best
- Gerald



--
View this message in context: http://camel.465427.n5.nabble.com/DSL-route-type-conversion-from-InputStream-to-JSON-tp5771816p5771818.html
Sent from the Camel - Users mailing list archive at Nabble.com.