I know that that was discussed several times here. But I'm new in JSON and junior dev. I would like to know if it's possible to have JSON from JAXB annotated classes ddirectly without any APIs (jackson, json)? For the moment I can obtain xml from JAXB classes, taht I transform to String, and transform String to JSON:-/ Thanks for all advices.
Asked
Active
Viewed 197 times
0
-
1I would replace your JAXB classes with Jackson classes. With Jackson you can map to both XML and JSON. – toongeorges May 12 '17 at 09:58
-
thanks, so I don't need any String between XML and JSON? the aim is to send requests with XML or JSON in the body. What I have to send an XML or JSON file or a String (in a stream)? – cygne May 12 '17 at 22:07
-
Something similar has been asked before here: http://stackoverflow.com/questions/39493173/how-to-convert-xml-to-json-using-only-jackson – toongeorges May 15 '17 at 13:26