title: Retrieve a list of json objects using volley
body: <p>I need to retrieve a list of json objects from mysql database, parse it using volley and populate a listview with it. I'm new to php and volley. Here's how I'm trying. </p>
  
  <p>JSON:</p>
  
  <pre><code>{"result":[{"id":"3133482000","name":"John Doe","class":"3A","parent":"admin@gmail.com","status":"0","stopid":"6","busno":"0"},{"id":"0","name":"","class":"","parent":"","status":"0","stopid":"0","busno":"0"},{"id":"334","name":"sam","class":"3a","parent":"","status":"0","stopid":"2","busno":"0"}]}
  </code></pre>
  
  <p>Android:</p>
  
  <pre><code> JSONArray sts;
  public static final String STUDENT_URL = "http://www.smartlbus.esy.es/getAllStudents.php";
          students=new ArrayList&lt;Student&gt;();
                  StringRequest stringRequest = new StringRequest(STUDENT_URL, new Response.Listener&lt;String&gt;() {
                      @Override
                      public void onResponse(String response) {
                          try {
                                  JSONObject jsonObject=null;
                                  jsonObject = new JSONObject(response);
                                  sts = jsonObject.getJSONArray(JSON_ARRAY);
  
                                  for (int i = 0; i &lt; sts.length(); i++) {
                                      JSONObject jo = sts.getJSONObject(i);
                                      Student s=new Student();
                                      Toast.makeText(StudentDetails.this,jo.getString(STUDENT_NAME),Toast.LENGTH_SHORT).show();
                                      s.setId(jo.getString(STUDENT_ID));
                                      s.setName(jo.getString(STUDENT_NAME));
                                      s.setClassNo(jo.getString(STUDENT_CLASS));
                                      s.setBusno(jo.getString(STUDENT_BUS));
                                      s.setStatus(Integer.parseInt(jo.getString(STUDENT_STATUS)));
                                      s.setStopid(jo.getString(STUDENT_STOP));
                                      students.add(s);
                                  }
                          }
                          catch (JSONException e) {
                              e.printStackTrace();
                          }
                      }
                  }, new Response.ErrorListener() {
                      @Override
                      public void onErrorResponse(VolleyError error) {
                          error.printStackTrace();
                      }
                  });
  
  
                  RequestQueue requestQueue = Volley.newRequestQueue(this);
                  requestQueue.add(stringRequest);
                  listView.setAdapter(new CustomListAdapter(StudentDetails.this,students));
  </code></pre>
  
  <p>Please help me out. In case this doesn't meet the standards here, please comment and let me know. I'll take it down.</p>