title: Deserialising mimekit.MimeMessage Object
body: <p>I am having some issues deserialising a mimeKit.mimeMessage that I serialised to a JSON string and stored in a redis key-value cache. </p>
  
  <p>I am able to serialise and store the mimeMessage successfully using either json.NET or Jil, however when I go to deserialise, the following error is thrown.</p>
  
  <p><strong>Thrown by json.NET</strong></p>
  
  <blockquote>
    <p>Unable to find a constructor to use for type MimeKit.Header. A class should either have a default constructor, one constructor with arguments or a constructor marked with the JsonConstructor attribute. Path 'Headers[0].Offset', line 1, position 22.</p>
  </blockquote>
  
  <p>I am using the StackExchange.Redis method stringGet to get the serialised object and then passing the RedisValue into Json.Net; code snippet below:</p>
  
  <pre><code>RedisValue result = db.StringGet(key);
  
  MimeMessage message = new MimeMessage();
  
  message = JsonConvert.DeserializeObject&lt;MimeMessage&gt;(result);
  </code></pre>
  
  <p>It is my understanding that a default constructor is always created, which makes this a little hard to get my head around, could the default constructor have been specified as private, and if so why?</p>
  
  <p>I have also checked the format of the returned JSON string and it is correct.</p>
  
  <p>Thanks for your help.</p>