rest dsl json contains escape sequence

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

rest dsl json contains escape sequence

Hi Guys

I was just doing some POC on rest dsl. I have my route like this


 from("direct:processRequest").log("Received  Request data ${body}")
                .setHeader(Exchange.HTTP_METHOD, constant("POST"))
                .setHeader("Content-Type", constant("application/json"))
                .log(" request - ${body}")
                .log("API Response - ${body}")
                //I dont want to do any unmarshalling to any object here. Just want to pass string bank
                .setHeader(Exchange.HTTP_RESPONSE_CODE, constant(200))

My response contains a lot of escape sequence before every quote. Check the response snippet below


Is there  a way I can relay back the same json i received from api call back to my http client? Need to avoid the back slashes here.

Reji Mathews
Sr. Developer - Middleware Integration / SOA ( Open Source - Apache Camel & Jboss Fuse ESB | Mule ESB )
LinkedIn -
Twitter - reji_mathews