title: In C# deserialize simple JSON object into a list of integers
body: <p>I keep finding examples of more complex JSON data and so far nothing for such a simple object. (note: this is .NET not Javascript)</p>
  <pre><code>{&quot;Ids&quot;:[5,6,7,8,9,10]}
  </code></pre>
  <p>I don't want to create a class, all I want is a simple List a simple list of the Ids so that I can loop over them later in the code.</p>
  <p>This does not work:</p>
  <pre><code>int[] ids = JsonConvert.DeserializeObject&lt;int[]&gt;(message.Message);
  </code></pre>
  <p>Nor does this:</p>
  <pre><code>List&lt;int&gt; ids = JsonConvert.DeserializeObject&lt;List&lt;int&gt;&gt;(message.Message);
  </code></pre>
  <p>I get errors like &quot;Cannot deserialize the current JSON object ... because the type requires a JSON array...&quot;</p>