title: How to deserialize a JSON array with nested arrays of objects
body: <p>I have a JSON string as follows and want to deserialize it:</p>
  
  <pre><code>[[{"campaignId":201410018,"programCode":"54321"}],[{"campaignId":201410018,"programCode":"54321"}]]
  </code></pre>
  
  <p>I have created some classes as follows:</p>
  
  <pre><code>public class Rootclass
  {
      public List&lt;JSONResponse&gt; rootClass { get; set; }
  }
  
  public class JSONResponse
  {
      public int campaignId { get; set; }
      public string programCode { get; set; }
  }
  </code></pre>
  
  <p>I am calling this JSON.NET method to deserialize the JSON:</p>
  
  <pre><code>List&lt;Rootclass&gt; myDeserializedObjList = (List&lt;Rootclass&gt;)Newtonsoft.Json.JsonConvert.DeserializeObject(json, typeof(List&lt;Rootclass&gt;));
  </code></pre>
  
  <p>But I am getting the error below:</p>
  
  <pre><code>Cannot deserialize JSON array (i.e. [1,2,3]) into type 'JSON_Test.Rootclass'.
  The deserialized type must be an array or implement a collection interface like IEnumerable, ICollection or IList.
  </code></pre>
  
  <p>What am I doing wrong?</p>