I have a function to parse JSON
in android. I use org.json
for my parsing.
It is something like this:
class ClassName {
public static ArrayList<DataObjectClass> parseResponse(String response){
JSONObject responseObject = new JSONObject(response);
if(responseObject.has("someArray")){
JSONArray someArray = responseObject.getJSONArray("someArray");
// etc... etc... and i do logic
}
}
return new DataObjectClass(params...)
}
Now I timed my parsing from start to end, and each time I call the function again the parsing time reduces (Unless i quit the app and come again)
I checked the JSONTokener
Code and JSONObject
code, but I cant find any code for caching. Where is this happening and how can I turn it off (for testing purposes)