title: json.net serialize derived as generic base
body: <p>(this issue stems from trying to serialize/deserialize LikeType classes to JSON - <a href="https://github.com/kleinwareio/LikeType" rel="nofollow noreferrer">https://github.com/kleinwareio/LikeType</a>)</p>
  
  <p>I have:</p>
  
  <pre><code>    public abstract class LikeType&lt;T&gt;
      {
        public T Value;
        // ....
  
        // how to tell json.net to serialize/deserialize classes deriving
        // from this like it would T ???
      }
  
      public class Name : LikeType&lt;string&gt;  { 
        public Name(string s) : base(s) { } 
        // does not add any properties
      }
  
      void test()
      {
        var name = new Name("john");
        var jobj = new JObject();
        try
        {
          jobj.Add("key", new JObject(name));
        }
        catch (Exception e)
        {
           !Exeption !
           e = {System.ArgumentException: Could not determine JSON object type for type Name. at Newtonsoft.Json.Linq.JValue.GetValueType(Nullable`1 current, Object value) at  Newtonsoft.Json.Linq.JContainer.CreateFromContent(Object content)
        }
      }
  </code></pre>
  
  <p>How can I specify that all classes deriving from <code>LikeType&lt;T&gt;</code> will be serialized/ deserialized to JSON with Json.Net in the same way <code>T</code> would?</p>
  
  <p>(in this case, Json.Net should serialize/deserialize Name in the same way it would a string)</p>