title: Android: Java.lang.String cannot be converted to JsonArray
body: <p>This is my android code. When I am trying to parse my jsonArray it gives me an error that string cannot be converted to Jsonarray through my response is json array:</p>
  
  <pre><code>public class Main2Activity extends AppCompatActivity {
  
      EditText tv1;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main2);
          tv1= (EditText) findViewById(R.id.textView);
  
          DefaultOAuthConsumer defaultOAuthConsumer  = new DefaultOAuthConsumer("my consumer key","my secret key");
  
          //REQUEST URL
          String url = "http://back.unaux.com/wp-json/wc/v2/products";
  
          RequestQueue requestQueue;
          requestQueue = Volley.newRequestQueue(this);
  
          try {
              url = defaultOAuthConsumer.sign(url);
              Toast.makeText(this, url, Toast.LENGTH_SHORT).show();
          } catch (OAuthMessageSignerException e) {
              e.printStackTrace();
          } catch (OAuthExpectationFailedException e) {
              e.printStackTrace();
          } catch (OAuthCommunicationException e) {
              e.printStackTrace();
          }
  
          JsonArrayRequest req=new JsonArrayRequest(url, new Response.Listener&lt;JSONArray&gt;() {
              @Override
              public void onResponse(JSONArray response) {
                  Toast.makeText(Main2Activity.this, response.toString(), Toast.LENGTH_SHORT).show();
              }
          }, new Response.ErrorListener() {
              @Override
              public void onErrorResponse(VolleyError error) {
                  Toast.makeText(Main2Activity.this,"Error"+error.getMessage(), Toast.LENGTH_SHORT).show();
              }
          });
  
          requestQueue.add(req);
      }
  }
  </code></pre>
  
  <p>This is my response for json</p>
  
  <pre><code>[
     {
        "id":685,
        "name":"Caramel-min",
        "slug":"caramel-min",
        "permalink":"http:\/\/back.unaux.com\/product\/caramel-min\/",
        "date_created":"2017-09-26T18:56:01",
        "date_created_gmt":"2017-09-26T18:56:01",
        "date_modified":"2017-09-27T12:27:56",
        "date_modified_gmt":"2017-09-27T12:27:56",
        "type":"variable",
        "status":"publish",
        "featured":false,
        "catalog_visibility":"visible",
        "description":"",
        "short_description":"",
        "sku":"",
        "price":"350",
        "regular_price":"350",
        "sale_price":"",
        "date_on_sale_from":null,
        "date_on_sale_from_gmt":null,
        "date_on_sale_to":null,
        "date_on_sale_to_gmt":null,
        "price_html":"&lt;span class=\"woocommerce-Price-amount amount\"&gt;&lt;span class=\"woocommerce-Price-currencySymbol\"&gt;&amp;#8377;&lt;\/span&gt;350.00&lt;\/span&gt; &amp;ndash; &lt;span class=\"woocommerce-Price-amount amount\"&gt;&lt;span class=\"woocommerce-Price-currencySymbol\"&gt;&amp;#8377;&lt;\/span&gt;500.00&lt;\/span&gt;",
        "on_sale":false,
        "purchasable":true,
        "total_sales":2,
        "virtual":false,
        "downloadable":false,
        "downloads":[
  
        ],
        "download_limit":-1,
        "download_expiry":-1,
        "external_url":"",
        "button_text":"",
        "tax_status":"taxable",
        "tax_class":"",
        "manage_stock":false,
        "stock_quantity":null,
        "in_stock":true,
        "backorders":"no",
        "backorders_allowed":false,
        "backordered":false,
        "sold_individually":false,
        "weight":"1.0",
        "dimensions":{
           "length":"",
           "width":"",
           "height":""
        },
        "shipping_required":true,
        "shipping_taxable":true,
        "shipping_class":"",
        "shipping_class_id":0,
        "reviews_allowed":true,
        "average_rating":"0.00",
        "rating_count":0,
        "related_ids":[
  
        ],
        "upsell_ids":[
  
        ],
        "cross_sell_ids":[
  
        ],
        "parent_id":0,
        "purchase_note":"",
        "categories":[
           {
              "id":43,
              "name":"Chocolate",
              "slug":"chocolate"
           }
        ],
        "tags":[
  
        ],
        "images":[
           {
              "id":710,
              "date_created":"2017-09-27T12:25:19",
              "date_created_gmt":"2017-09-27T12:25:19",
              "date_modified":"2017-09-27T12:25:19",
              "date_modified_gmt":"2017-09-27T12:25:19",
              "src":"http:\/\/back.unaux.com\/wp-content\/uploads\/2015\/08\/Caramel-min-1.jpg",
              "name":"Caramel-min-1",
              "alt":"",
              "position":0
           },
           {
              "id":710,
              "date_created":"2017-09-27T12:25:19",
              "date_created_gmt":"2017-09-27T12:25:19",
              "date_modified":"2017-09-27T12:25:19",
              "date_modified_gmt":"2017-09-27T12:25:19",
              "src":"http:\/\/back.unaux.com\/wp-content\/uploads\/2015\/08\/Caramel-min-1.jpg",
              "name":"Caramel-min-1",
              "alt":"",
              "position":1
           }
        ],
        "attributes":[
           {
              "id":0,
              "name":"Kg",
              "position":0,
              "visible":true,
              "variation":true,
              "options":[
                 "1\/2",
                 "1.0",
                 "2.0",
                 "3.0",
                 "4.0",
                 "5.0"
              ]
           }
        ],
        "default_attributes":[
  
        ],
        "variations":[
           705,
           704
        ],
        "grouped_products":[
  
        ],
        "menu_order":0,
        "meta_data":[
           {
              "id":1369,
              "key":"_vc_post_settings",
              "value":{
                 "vc_grid_id":[
  
                 ]
              }
           },
           {
              "id":1404,
              "key":"slide_template",
              "value":"default"
           }
        ],
        "_links":{
           "self":[
              {
                 "href":"http:\/\/back.unaux.com\/wp-json\/wc\/v2\/products\/685"
              }
           ],
           "collection":[
              {
                 "href":"http:\/\/back.unaux.com\/wp-json\/wc\/v2\/products"
              }
           ]
        }
     }
  ]
  </code></pre>