I am working on an Android application. In my app I have to convert a string to Json Object, then parse the values. I checked for a solution in stackoverflow and found simil
its work
String json = "{\"phonetype\":\"N95\",\"cat\":\"WP\"}"; try { JSONObject obj = new JSONObject(json); Log.d("My App", obj.toString()); Log.d("phonetype value ", obj.getString("phonetype")); } catch (Throwable tx) { Log.e("My App", "Could not parse malformed JSON: \"" + json + "\""); }