title: Deserializing JSON - how to ignore the root element?
body: <p>I'm consuming a WCF service that returns JSON results wrapped inside the 'd' root element. The JSON response looks like this:</p>
  
  <pre><code>{"d":[
    {
      "__type":"DiskSpaceInfo:#Diagnostics.Common",
      "AvailableSpace":38076567552,
      "Drive":"C:\\",
      "TotalSpace":134789197824
    },
    {
      "__type":"DiskSpaceInfo:#Diagnostics.Common",
      "AvailableSpace":166942183424,
      "Drive":"D:\\",
      "TotalSpace":185149157376
    }
  ]}
  </code></pre>
  
  <p>I don't want to use dynamic typing, I have my class Diagnostics.Common.DiskSpaceInfo that I want to use when deserializing.</p>
  
  <p>I am using Json.NET (Netwonsoft JSON).</p>
  
  <p>The question is how to tell it to ignore the root element (that 'd' element) and parse what is inside.</p>
  
  <p>The best solution I have so far is to use an anonymous type:</p>
  
  <pre><code>DiskSpaceInfo[] result = JsonConvert.DeserializeAnonymousType(json, new
      {
          d = new DiskSpaceInfo[0]
      }).d;
  </code></pre>
  
  <p>this actually works but I don't like it very much. Is there another way? What I would like is something like:</p>
  
  <pre><code>DiskSpaceInfo[] result = JsonConvert.Deserialize(json, skipRoot: true);
  </code></pre>
  
  <p>or something like that...</p>