title: Cannot deserialize the current JSON array (e.g. [1,2,3])
body: <p>I am trying to read my JSON result.</p>
  
  <p><strong>Here is my RootObject</strong></p>
  
  <pre><code>public class RootObject
  {
  public int id { get; set; }
  public bool is_default { get; set; }
  public string name { get; set; }
  public int quantity { get; set; }
  public string stock { get; set; }
  public string unit_cost { get; set; }
  }
  </code></pre>
  
  <p><strong>Here is my JSON result</strong></p>
  
  <pre><code>[{"id": 3636, "is_default": true, "name": "Unit", "quantity": 1, "stock": "100000.00", "unit_cost": "0"}, {"id": 4592, "is_default": false, "name": "Bundle", "quantity": 5, "stock": "100000.00", "unit_cost": "0"}]
  </code></pre>
  
  <p>Here is my code to read the result</p>
  
  <pre><code>     public static RootObject GetItems(string user, string key, Int32 tid, Int32 pid)
      {
          // Customize URL according to geo location parameters
          var url = string.Format(uniqueItemUrl, user, key, tid, pid);
  
          // Syncronious Consumption
          var syncClient = new WebClient();
  
          var content = syncClient.DownloadString(url);
  
          return JsonConvert.DeserializeObject&lt;RootObject&gt;(content);
  
      }
  </code></pre>
  
  <p>But I am having a problem with this error :</p>
  
  <blockquote>
    <p>Cannot deserialize the current JSON array (e.g. [1,2,3]) into type 'avaris_cash_salepoint.BL.UniqueItemDataRootObject' because the type
    requires a JSON object (e.g. {"name":"value"}) to deserialize
    correctly. To fix this error either change the JSON to a JSON object
    (e.g. {"name":"value"}) or change the deserialized type to an array or
    a type that implements a collection interface (e.g. ICollection,
    IList) like List that can be deserialized from a JSON array.
    JsonArrayAttribute can also be added to the type to force it to
    deserialize from a JSON array. Path '', line 1, position 1.</p>
  </blockquote>
  
  <p>at this line:
      return JsonConvert.DeserializeObject(content);</p>
  
  <p>Any help to fix this error ?</p>