Are there any good JSON to XML and Vice-versa java lib converters available, Which can convert the formats on the fly. On the fly means, if i give a JSON object (not .json file reader sorts) it should gimme back an xml document (and not .xml file) .
Tried XStream, but its giving me unwanted Element nodes which is not required in my xml. The converter in Json.org was close, but it creates only Text/node based XML and NOT creating attribute based.
Eg: If my JSON data is :
{Order:{OrderLine:{ItemID:"1234"}},OrderNo:"4567"}
Output that i want is :
<Order OrderNo="4567"><OrderLine ItemID="1234"/></Order>
Any thoughts?