I am getting this compilation error:
cannot find symbol Constructor JSONObject(java.lang.String)
Can any one explain what is wrong with it?
String jsnString = new String("{\"fname\":\"DKP\",\"lname\":\"patel\"}");
JSONObject jObj = new JSONObject(new String(jsnString));
I also tried with:
JSONObject jObj = new JSONObject(jsnString);