title: RestSharp Deserialization with JSON Array
body: <p>I have a JSON response that I'm trying to deserialize with <a href="http://restsharp.org/">RestSharp</a>, and it looks like this:</p>
  
  <pre><code>{"devices":[{"device":{"id":7,"deviceid":"abc123","name":"Name"}},
              {"device":{"id":1,"deviceid":"def456","name":"Name"}}],
   "total":2,
   "start":0,
   "count":2}
  </code></pre>
  
  <p>Based off of some suggestions I've found, I've tried to setup my POCO like this:</p>
  
  <pre><code>public class DevicesList
  {
      public List&lt;DeviceContainer&gt; Devices;
  }
  
  public class DeviceContainer
  {
      public Device Device;
  }
  
  public class Device
  {
      public int Id { get; set; }
      public string DeviceId { get; set; }
      public string Name { get; set; }
  }
  </code></pre>
  
  <p>And then my execution looks like this:</p>
  
  <pre><code>// execute the request
  var response = client.Execute&lt;DevicesList&gt;(request);
  </code></pre>
  
  <p>However, <code>response.Data</code> is NULL, and I've tried other variations with no luck.</p>
  
  <p>So, what class structure and mapping should be used for this situation? I've also tried this without the extra <code>DeviceContainer</code> class.</p>
  
  <p>Thanks for the help.</p>