title: Json.NET getting generic property types name on serialization?
body: <p>I'm trying to figure out how I can have a core object being returned from my API</p>
  
  <pre><code>public class Response&lt;T&gt; {
      public T Data {get;set;}
  }
  </code></pre>
  
  <p>Where T is some object with properties e.g.</p>
  
  <pre><code>public class Thang {
     public string Thing  {get;set;}
  }
  </code></pre>
  
  <p>Using  <code>JsonConvert.Serialize( myResponse );</code> will return the <code>T Data</code> property as <code>Data</code>, and rightly so. </p>
  
  <p>But what If I wanted to use the name for the type of <code>T</code>? So the response Json would actually include a property called <code>Thang</code> not <code>Data</code> as follows.</p>
  
  <pre><code>{
      "thang": {
          "thing" : "hey"
      }
  }
  </code></pre>
  
  <p>I'm curious if there is a relatively simple way to do this with <a href="http://james.newtonking.com/json" rel="nofollow">Json.net</a> or do you have to create a custom <code>JsonConverter</code> and use reflection to get the <code>T</code> type name when writing?</p>
  
  <p>Thanks.</p>