Note that there are some explanatory texts on larger screens.

plurals
  1. POHow can i parse the following?
    primarykey
    data
    text
    <p>I am getting response in this format (Whole response)</p> <p>I have tried the following code so far but getting error </p> <pre><code>private String connect(String url) { HttpClient httpclient = new DefaultHttpClient(); HttpGet httpget = new HttpGet(url); HttpResponse response; String returnString = null; try { response = httpclient.execute(httpget); if (response.getStatusLine().getStatusCode() == 200) { HttpEntity entity = response.getEntity(); if (entity != null) { InputStream instream = entity.getContent(); String res = convertStreamToString(instream); JSONObject jsonObj = new JSONObject(res); String f = jsonObj.getString("Result"); f = f.trim(); System.out.println("!!!!!!!!!!!!!!! "+f); String s= jsonObj.getString("About"); System.out.println("@@@@@@ "+s); JSONArray get = jsonObj.getJSONArray("Result"); // lets loop through the JSONArray and get all the items for (int i = 0; i &lt; get.length(); i++) { // printing the values to the logcat System.out.println("&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;"+get.getJSONObject(i).getString("About").toString()); System.out.println("&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;&amp;"+get.getJSONObject(i).getString("AboutMeText").toString()); } instream.close(); } } else { returnString = "Unable to load page - " + response.getStatusLine(); } } catch (IOException ex) { returnString = "Connection failed; " + ex.getMessage(); } catch (JSONException ex) { returnString = "JSON failed; " + ex.getMessage(); } return returnString; } private static String convertStreamToString(InputStream is) { BufferedReader reader = new BufferedReader(new InputStreamReader(is)); StringBuilder sb = new StringBuilder(); String line = null; try { while ((line = reader.readLine()) != null) { sb.append(line + "\n"); } } catch (IOException e) { e.printStackTrace(); } finally { try { is.close(); } catch (IOException e) { e.printStackTrace(); } } return sb.toString(); } </code></pre> <p>Everytime i am trying to parse it it gives me json failed exception and says no value for.. Please let me know if i am making any mistake here.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload