I am writing a REST based webservice code, in which an xml is read as POST body content. <REQ>J*Wt!&Gs+aGphxR</REQ>
The data may contain alphanumeric or symbols.
I am using json-jena jar and converting the xml to java object and reading the values.
JSONObject jsonObject = XML.toJSONObject(body);
For the specific request above I am getting error as below org.json.JSONException: Missing ';' in XML entity: &gs at 40 [character 41 line 1]
Please let me know how can i convert to json object without error.
My requirement is to read the values between the REQ tag with the actual values specified by the users (not the encoded string).