I have created a JSONObject and put values in it like below . Then I converted my object "h" to string and write a file in the sdcard with that string.
JSONObject h = new JSONObject();
try {
h.put("NAme","Yasin Arefin");
h.put("Profession","Student");
} catch (JSONException e) {
e.printStackTrace();
}
String k =h.toString();
writeToFile(k);
In the file I see text written like the format below .
{"NAme":Yasin Arefin","Profession":"Student"}
My question is how do I read that particular file and convert those text back to JSONObject ?