I need to store complete xml document as part of json object. when i receive the request and try to create json object from json string like below -
{"content":{
"name" : "xyz",
"details":"<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<ns0:Report xmlns:ns0=\"http://www.khisko.com/triTypes\">
<StackTrace>Job-8004 Error in [xxxxxxxxxx]
Output data invalid
at com.xyz.tst.a(Unknown Source)
caused by: java.lang.NullPointerException
</StackTrace>
<Msg>Output data invalid</Msg>
</ns0:Report>"
}}
I am getting Unterminated string error at first char of details. how can i handle it.
i am using org.json.JSONObject constructor which takes java string as parameter and passing above json as java string.
Thanks