title: com.android.volley.ParseError: org.json.JSONException: Value [{}] of type org.json.JSONArray cannot be converted to JSONObject
body: <p>jsondata:</p>
  
  <blockquote>
    <p>[{"product_id":"2","product_title":"test","product_thumbnail":"","product_description":"test","product_place":"","product_user":"1","product_store":"","product_date":"1546875653","product_cost":"","product_off":""},{"product_id":"3","product_title":"test1","product_thumbnail":"","product_description":"test1","product_place":"","product_user":"1","product_store":"","product_date":"1546875653","product_cost":"","product_off":""}]</p>
  </blockquote>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>Rest response error:: com.android.volley.ParseError: org.json.JSONException: Value [{"product_id":"2","product_title":"test","product_thumbnail":"","product_description":"test","product_place":"","product_user":"1","product_store":"","product_date":"1546875653","product_cost":"","product_off":""},{"product_id":"3","product_title":"test1","product_thumbnail":"","product_description":"test1","product_place":"","product_user":"1","product_store":"","product_date":"1546875653","product_cost":"","product_off":""}] of type org.json.JSONArray cannot be converted to JSONObject</p>
  </blockquote>
  
  <p>my android code:</p>
  
  <pre><code>_httpHandler.addRequest(Request.Method.GET, "product", null, response -&gt; {
          try {
              Log.e("response is:",response.toString());
  
              for (int i = 0; i &lt; response.length(); i++) {
                  JSONObject product = response.getJSONObject(String.valueOf(i));
  
                  productList.add(new Product(
                          product.getString("product_id"),
                          product.getString("product_title"),
                          product.getString("product_thumbnail"),
                          product.getString("product_description"),
                          product.getString("product_place"),
                          product.getString("product_user"),
                          product.getString("product_store"),
                          product.getString("product_date"),
                          product.getString("product_off"),
                          product.getString("product_price")));
              }
  
              ProductAdapter adapter = new ProductAdapter(MainActivity.this, productList);
              recyclerView.setAdapter(adapter);
  
          } catch (JSONException e) {
              e.printStackTrace();
          }
      }, error -&gt; {
          Toast.makeText(MainActivity.this, "Get Product Has Error", Toast.LENGTH_LONG).show();
          Log.e("Rest response error: ", error.toString());
      });
  </code></pre>
  
  <p>and AddRequest function is:</p>
  
  <pre><code>public void addRequest(int method, String url, JSONObject jsonRequest,
                         Response.Listener&lt;JSONObject&gt; listener, Response.ErrorListener errorListener) {
      url = api_url + url;
      Log.e("url is: ", url);
      JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(method, url, jsonRequest, listener, errorListener){
          @Override
          public Map&lt;String, String&gt; getHeaders() throws AuthFailureError {
              Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
              params.put("Content-Type","application/x-www-form-urlencoded");
              params.put("Accept", "application/json");
              return params;
          }
      };
      requestQueue.add(jsonObjectRequest);}
  </code></pre>
  
  <p>Can you help me to fix it?</p>