Parsing Google Shopping Json Search Results <p>After a few weeks of trying numerous examples found here and it seems throughout the web, I'm stumped. I can retrieve the desired search results from Google Shopping just fine:</p> <pre><code>{ "items": [ { "product": { "title": "The Doctor's BrushPicks Toothpicks 250 Pack", "brand": "The Doctor's" } } ] } </code></pre> <p>My problem is that I have the data sitting in a string, how do I extract the two values (title,brand) in order to use them elsewhere in the program?</p> <p>Here is the class in question: public class HttpExample extends Activity {</p> <pre><code>TextView httpStuff; DefaultHttpClient client; JSONObject json; final static String URL = "https://www.googleapis.com/shopping/search..."; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.httpex); httpStuff = (TextView) findViewById(R.id.tvHttp); client = new DefaultHttpClient(); new Read().execute("items"); } public JSONObject products(String upc) throws ClientProtocolException, IOException, JSONException { StringBuilder url = new StringBuilder(URL); url.append(upc); HttpGet get = new HttpGet(url.toString()); HttpResponse r = client.execute(get); int status = r.getStatusLine().getStatusCode(); if (status == 200) { HttpEntity e = r.getEntity(); String data = EntityUtils.toString(e); JSONObject timeline = new JSONObject(data); return timeline; } else { Toast.makeText(HttpExample.this, "error", Toast.LENGTH_SHORT); return null; } } public class Read extends AsyncTask&lt;String, Integer, String&gt; { @Override protected String doInBackground(String... params) { // TODO Auto-generated method stub try { String upc = ExportMenuActivity.upc; json = products(upc); return json.getString(params[0]); } catch (ClientProtocolException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (JSONException e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } @Override protected void onPostExecute(String result){ httpStuff.setText(result); } } </code></pre> <p>}</p> <p>The output of httpStuff.setText(result):</p> <pre><code>[{"product":{"brand":"The Doctor's, "title":"The Doctor's..."}}] </code></pre>