title: Deserialize string with Tuple key in C#
body: <p>I have a dictionary like this:</p>
  
  <pre><code>var dict1 = new Dictionary&lt;(int, int), int);
  dict1.add((1,2), 3);
  </code></pre>
  
  <p>That is serialized to a string using:</p>
  
  <pre><code>var s = JsonConvert.SerializeObject(dict1);
  // s = "{\"(1,2)\":\"3\"}";
  </code></pre>
  
  <p>When trying to deserialize the string using:</p>
  
  <pre><code>var j = JsonConvert.DeserializeObject&lt;Dictionary&lt;(int, int), int&gt;&gt;(s);
  </code></pre>
  
  <p>I get an error like:</p>
  
  <blockquote>
    <p>'Could not convert string '(1,2)' to dictionary key type 'System.ValueTuple`2[System.Int32,System.Int32]'. Create a TypeConverter to convert from the string to the key type object.</p>
  </blockquote>
  
  <p>How can I deserialize my string into a tuple key? Using a custom object or a <code>TypeConverter</code>? If so, how?</p>