I found that many of the tutorials on the net and here on SO also refer to net.sf.json
library to convert an xml file to json object.
But, I want an alternative preferably using Gson. Is it possible? I don't have well defined Java Classes for the XML file. But, I just want to convert the xml file to com.google.gson.JsonObject
. How to achieve it?