title: JSON deserialization using GSON
body: <p>I'm trying to parse some JSON, but I'm having a little trouble.</p>
  
  <p>the JSON:</p>
  
  <pre><code>{
  "CashGames": {
      "Record": [
          {
              "_id": "1",
              "Game": "No Limit Holdem",
              "BlindAmounts": "1/3",
              "MinBuyin": "100",
              "MaxBuyin": "300",
              "CasinoID": "1",
              "MiscNotes": "",
              "MoreNotes": ""
          },
          {
              "_id": "2",
              "Game": "No Limit Holdem",
              "BlindAmounts": "2/5",
              "MinBuyin": "200",
              "MaxBuyin": "1000",
              "CasinoID": "1",
              "MiscNotes": "aria",
              "MoreNotes": ""
          }
  ]
  }}
  </code></pre>
  
  <p>the class that defines it:</p>
  
  <pre><code>public class RecordResponse {
  
  public Record records;
  
  public class Record {
  
      public List&lt;Result&gt; results;
  }
  
  public static class Result {
  
      @SerializedName("Game")
      public String Game;
  
      @SerializedName("BlindAmounts")
      public String BlindAmounts;
  
      @SerializedName("MinBuyin")
      public String MinBuyin;
  
      @SerializedName("MaxBuyin")
      public String Maxbuyin;
  
      @SerializedName("CasinoID")
      public long CasinoID;
  
      @SerializedName("MiscNotes")
      public String MiscNotes;
  
      @SerializedName("MoreNotes")
      public String MoreNotes;
  }   
  }
  </code></pre>
  
  <p>and what I'm trying to do to parse it:</p>
  
  <pre><code>                                RecordResponse cashResponse = gson.fromJson(cashRecords, RecordResponse.class);
  
  
                              List&lt;Result&gt; results = cashResponse.records.results;
                              for (Result cashResult : results){
                                  Log.e("log_test", cashResult.Game);
                              }
  </code></pre>
  
  <p>but i get a NullPointerException when I try to declare results (the List).  What am I doing wrong?</p>