Sorry for the title, I explain.
I'm developing an Android app that use a WebService on Google App Engine. In my WebService I've an ArrayList converted in JSON trough JAX-RS, and the final JSON is something like
{ "lessons" : [ { "name" : "blabla", "prof":"Tom" }, { "name" : "blabla", "prof":"Tom" } ] }
Is this practical or is there a better way?
Then I fetch this JSON from the Android app and convert it in a JSONObject with a snipplet found online:
DefaultHttpClient defaultClient = new DefaultHttpClient();
HttpGet httpGetRequest = new HttpGet(s);
HttpResponse httpResponse = defaultClient.execute(httpGetRequest);
BufferedReader reader = new BufferedReader(new InputStreamReader(httpResponse.getEntity().getContent(), "UTF-8"));
String json = reader.readLine();
JSONObject jsonObject = new JSONObject(json);
How can I get back to my ArrayList?
I've read tons of code and tried to use Gson... This should be easy but I've lost an entire day yesterday..