title: In C#, how do I model a JSON object with multiple nested arrays?
body: <p>I am getting this JSON response from a system I am connecting to and trying to figure out the best way to deserialize it into a C# object.  I am currently using <a href="http://restsharp.org/" rel="noreferrer">RestSharp</a> which seems pretty straight forward to use but the format of the JSON is baffling me a bit.  Here is the format that its coming in as:</p>
  
  <pre><code>[
    {"name": "Tickets:",
     "schema": [
      {"dataType": "string", "colName": "First", "idx": 0}, 
      {"dataType": "string", "colName": "Second", "idx": 1}, 
      {"dataType": "string", "colName": "Name", "idx": 2}
     ], 
     "data": [
              ["bill", "test", "joe"],
              ["bill2", "test2", "joe2"],
              ["bill3", "test3", "joe3"]
             ]
    }
  ] 
  </code></pre>
  
  <p>Here is my current code:</p>
  
  <pre><code>var url = "http://myUrl:10111";
  var client = new RestClient { BaseUrl = url };
  
  var request = new RestRequest { Method = Method.GET, Resource = "/search?fmt=Json", RequestFormat = DataFormat.Json };
  request.AddHeader("accept", "application/json");
  
  var response = client.Execute(request);
  var wptResponse = new JsonDeserializer().Deserialize&lt;TicketResults&gt;(response);
  return wptResponse;
  </code></pre>
  
  <p>but as stated above I am trying to figure out the correct way to model the TicketResults object to support deserializing this message above.</p>
  
  <p>Ideally I would like something like this:</p>
  
  <pre><code> public class TicketResults
   {
       public List&lt;Ticket&gt; Tickets {get;set;}
   }
  
   public class Ticket
   {
       public string First {get;set;}
       public string Second {get;set;}
       public string Name {get;set;}
   }
  </code></pre>
  
  <p>and in this example above would get three entries in the Tickets collection.</p>
  
  <p>Also, is the above JSON format normal as i have never seen this broken out into separate schema and data section (I can see where it might save some space but in this case the messages are not that big)</p>