title: Deserialize array of key value pairs using Json.NET
body: <p>Given the following json:</p>
  
  <pre><code>[ {"id":"123", ... "data":[{"key1":"val1"}, {"key2":"val2"}], ...}, ... ]
  </code></pre>
  
  <p>that is part of a bigger tree, how can I deserialize the "data" property into:</p>
  
  <pre><code>List&lt;MyCustomClass&gt; Data { get; set; }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>List&lt;KeyValuePair&gt; Data { get; set; }
  </code></pre>
  
  <p>or</p>
  
  <pre><code>Dictionary&lt;string, string&gt; Data { get; set; }
  </code></pre>
  
  <p>using Json.NET? Either version will do (I prefer List of MyCustomClass though). I already have a class that contains other properties, like this:</p>
  
  <pre><code>public class SomeData
  {
     [JsonProperty("_id")]
     public string Id { get; set; }
     ...
     public List&lt;MyCustomClass&gt; Data { get; set; }
  }
  </code></pre>
  
  <p>where "MyCustomClass" would include just two properties (Key and Value). I noticed there is a KeyValuePairConverter class that sounds like it would do what I need, but I wasn't able to find an example on how to use it. Thanks. </p>