Deserializing Json array with variable names first using C# Json.NET
<p>I'm getting an irregular JSON array from the Census Bureau's public api.
The variable names are all in the first element, and I'm having trouble deserializing it.</p>

<p><a href="http://api.census.gov/data/2014/pep/agesex?get=AGE,POP,SEX&amp;for=us:*&amp;DATE=7" rel="nofollow">http://api.census.gov/data/2014/pep/agesex?get=AGE,POP,SEX&amp;for=us:*&amp;DATE=7</a></p>

<p>gives me JSON like this:</p>

<pre><code>[["AGE","POP","SEX","DATE","us"],
["0","3948350","0","7","1"],
["1","3962123","0","7","1"],
["2","3957772","0","7","1"],
["3","4005190","0","7","1"],
["4","4003448","0","7","1"],
["5","4004858","0","7","1"],
["6","4134352","0","7","1"],
["7","4154000","0","7","1"]]
</code></pre>

<p>I can successfully deserialize this using:</p>

<pre><code>var test1 = JsonConvert.DeserializeObject&lt;String[][]&gt;(jsonStr);
</code></pre>

<p>However, I'm trying to deserialize it to a class like this:</p>

<pre><code>public class TestClass
{
    public string AGE { get; set; }
    public string POP { get; set; }
    public string SEX { get; set; }
    public string DATE { get; set; }
    public string us { get; set; }
}
</code></pre>

<p>I'm trying to do this:</p>

<pre><code>var test2 = JsonConvert.DeserializeObject&lt;TestClass[]&gt;(jsonStr);
</code></pre>

<p>But I'm getting the following exception:</p>

<blockquote>
  <p>An exception of type 'Newtonsoft.Json.JsonSerializationException'
  occurred in Newtonsoft.Json.dll but was not handled in user code</p>
  
  <p>Additional information: Cannot create and populate list type
  TestClass. Path '[0]', line 1, position
  2.</p>
</blockquote>