found a solution from changing converting method. earlier I used net.sf.json.JSONObject
to create the JSONObject
and net.sf.json.xml.XMLSerializer
to do the convertion. I switched to org.json.JSONObject
and org.json.XML
and used
JSONObject json = XML.toJSONObject(input);
method. it gave me the complete set of tags I want to convert. :)