title: Diffrence between JsonObjectRequest & JsonArrayRequest in volley in android?
body: <p>Hello all i am using volley to send request to the server. I am sending some params to server &amp; getting a json array &amp; json object in response. As of now i am using JsonObjectRequest custom request for getting the response.If the response is JsonArray i get the json array if response is jsonObject then i get the json object.So which approach should i follow for getting the response?</p>
  
  <pre><code>Following is the code for sending request 
  public void sendData()
  {
      RequestQueue que=Volley.newRequestQueue(this);
      Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
      params.put("fname",fname );
      params.put("lname",lname );
      params.put("email",email );
      params.put("pswd",password);
  
  
       final ProgressDialog dialog = new ProgressDialog(HealthCreateAccount.this);
       dialog.setTitle("Please Wait");
       dialog.setMessage("Creating Account..");
       dialog.setCancelable(false);
       dialog.show();
  
      CustomRequest jsObjRequest = new CustomRequest(Method.POST, url, params, new Response.Listener&lt;JSONObject&gt;() {
  
                  @Override
                  public void onResponse(JSONObject response)
                  {
                      dialog.dismiss();
                      Toast.makeText(getApplicationContext(), response.toString(), Toast.LENGTH_SHORT).show();
  
  
                  }
              }, new Response.ErrorListener() {
  
                  @Override
                  public void onErrorResponse(VolleyError response) {
                      dialog.dismiss();
                      Toast.makeText(getApplicationContext(), "Unable to Create Account!", Toast.LENGTH_SHORT).show();
                      Log.i("RAE",response.toString());
                  }
              });
      que.add(jsObjRequest);
  
  }
  </code></pre>