title: Gson.fromJson() always returns null
body: <p>I'm trying to deserialize some JSON to a generic class. The structure is roughly as follows:</p>
  
  <pre><code>public abstract class AbstractRequest implements Constants
  {
      public abstract Class&lt;?&gt; getClazz();
  }
  
  
  public class GetTransaction extends AbstractTransactionRequest
  {
      @Override
      public Class&lt;Transaction&gt; getClazz()
      {
          return Transaction.class;
      }
  }
  </code></pre>
  
  <p>And the <code>Transaction</code> class is as follows:</p>
  
  <pre><code>public class Transaction implements Serializable
  {
      @SerializedName("_id")
      private String id;
  
      private int amount;
  
      @SerializedName("details")
      private Map&lt;String, String&gt; transactionDetails;
  
      private class Details {
          private String issuer;
  
          @SerializedName("redirect_url")
          private String redirectUrl;
  
          @SerializedName("approval_url")
          private String approvalUrl;
      }
  }
  </code></pre>
  
  <p>All classes are slightly more complicated but I removed irrelevant variables.</p>
  
  <p>Here's a JSON sample:</p>
  
  <pre><code>{
      "_id": "2740096e-58a0-4677-8947-84fcc54cfaad",
      "amount": 456,
      "details": {
          "issuer": "MYBANK",
          "redirect_url": "https://example.com/redirect/MYBANK",
          "approval_url": "https://example.com/v1/transaction/2740096e-58a0-4677-8947-84fcc54cfaad/MYBANK/authorize"
      }
  }
  </code></pre>
  
  <p>Now, I deserialize this code by doing </p>
  
  <pre><code>response.setData(Gson.fromJson(this.getResponse(), this.request.getClazz()));
  </code></pre>
  
  <p>Where <code>setData</code> accepts a <code>Object</code>, and <code>getResponse</code> returns the JSON as a <code>String</code>. I then do <code>(Transaction) response.getData()</code> which casts data to a <code>Transaction</code>. However, this is always null. Can anyone tell my why?</p>
  
  <p>Sorry for the potentially confusing code!</p>