How to display a backslash in json value in java. I get a org.json.JSONException: Illegal escape. at 9 with the below sample code. I'm using json 1.0.0 jar - org.json
String s1 = "{'Hi':'\\ksdfdsfsdfdfg'}";
int i = (int) '/';
System.out.println(s1);
try
{
JSONObject json = new JSONObject(s1);
}
catch (JSONException e)
{
// TODO Auto-generated catch block
e.printStackTrace();
}