title: Volley JSONArrayRequest with JSONObject as parameter
body: <p>I need to make a request with a JSONObject as follows:</p>
  
  <pre><code>{
      'LangIDs': [1, 2],
      'GenreIDs': [4],
      'LowPrice': 0,
      'HighPrice': 999,
      'SearchTerms': [],
      'Pagination': {
          'PageNumber': 0,
          'PageLength': 10
      }
  }
  </code></pre>
  
  <p>The expected response is a JSONArray. Using <a href="https://developer.android.com/training/volley/index.html" rel="nofollow">Volley</a>, I can't make a JsonArrayRequest with a JSONObject parameter. </p>
  
  <p>Before I made the request this way: </p>
  
  <pre><code>StringRequest jsonObjectRequest = new StringRequest(Request.Method.POST, url, new Response.Listener &lt; String &gt; () {
      @Override
      public void onResponse(String response) {
          JSONObject jsonObject;
          int id;
          String bookName;
          String Url;
          try {
              responseArray = new JSONArray(response);
          } catch (JSONException e) {
  
          }
  
          for (int i = 0; i &lt; response.length(); i++) {
              try {
                  jsonObject = responseArray.getJSONObject(i);
                  id = jsonObject.getInt(Constants.KEY_ID);
                  bookName = jsonObject.getString(Constants.KEY_BOOKNAME);
                  Url = imgUrl + jsonObject.getString(Constants.KEY_IMG_URL);
                  books.add(new Book(id, bookName, Url));
  
              } catch (JSONException e) {
                  e.printStackTrace();
              }
          }
          mAdapter.updateGrid(books);
          Log.v("Response", response);
      }
  }, new Response.ErrorListener() {@
      Override
      public void onErrorResponse(VolleyError error) {
          Log.e("Error:", error.getMessage());
      }
  }) {@
      Override
      protected Map &lt; String, String &gt; getParams() throws AuthFailureError {
          HashMap &lt; String, String &gt; params = new HashMap &lt; &gt; ();
          String message = getArguments().getString(Constants.KEY_FILTER_VALUES);
          Log.v("FilterMessage", message);
          params.put(Constants.KEY_PAGENUMBER, String.valueOf(0));
          params.put(Constants.KEY_PAGELENGTH, String.valueOf(10));
          return params;
      }
  };
  </code></pre>
  
  <p>But now it is JSONObject that contains JSONObject. </p>
  
  <p>How now I can make this request using Volley?</p>