title: Deserialising JSON into a generic object
body: <p>I have a three classes</p>
  
  <pre><code>public class A&lt;T&gt;
  {
      public bool Success {get; set;}
      public string Reason {get; set;}
      public T Data {get; set;}
  }
  
  public class B
  { 
      public string Token {get; set;}
  }
  
  public class C
  {
      public int SomeInt {get; set;}
      public string SomeString {get; set;}
      public double SomeDouble {get; set;}
  }
  </code></pre>
  
  <p>I call my web service and pass in A or A to deserialise into like this</p>
  
  <pre><code> async Task&lt;T&gt; MyTask&lt;T&gt;(...) (where T is A&lt;B&gt; or A&lt;C&gt;)
  </code></pre>
  
  <p>The service works fine and returns some JSON which if I try and to deserialise into a var, I'm getting nothing deserialised</p>
  
  <p>To deserialise, I'm using</p>
  
  <pre><code> var foo = JsonConvert.DeserializeObject&lt;T&gt;(response.Content);
  </code></pre>
  
  <p>Is there a limitation to how I can deserialise the object so I can only use a base class rather than this form of class?</p>