I have a bean that returns an XML string, which I want to convert to JSON.
The XmlJson data format appears to be deprecated in Camel 3. What is the best way to convert XML to JSON? There are no POJO classes that can be used as an intermediate representation.
Expected code:
rest().post("/hello")
.route()
.to("bean:myBean?method=methodThatReturnsXML")
.unmarshal() // something with XML
.marshal() // something with JSON
or
rest().post("/hello")
.route()
.to("bean:myBean?method=methodThatReturnsXML")
.transform() // something