title: Parse List of JSON objects using GSON
body: <p>I have a JSON object like this:</p>
  
  <pre><code>{
    "user1": {
      "timeSpent": "20.533333333333335h",
      "worklog": [
        {
          "date": "06/26/2013",
          "issues": [
            {
              "issueCode": "COC-2",
              "comment": "\ncccccc",
              "timeSpent": "20.533333333333335h"
            }
          ],
          "dayTotal": "20.533333333333335h"
        }
      ]
    },
    "admin": {
      "timeSpent": "601.1h",
      "worklog": [
        {
          "date": "06/25/2013",
          "issues": [
            {
              "issueCode": "COC-1",
              "comment": "",
              "timeSpent": "113.1h"
            }
          ],
          "dayTotal": "113.1h"
        },
        {
          "date": "06/26/2013",
          "issues": [
            {
              "issueCode": "COC-1",
              "comment": "",
              "timeSpent": "8h"
            },
            {
              "issueCode": "COC-2",
              "comment": "",
              "timeSpent": "480h"
            }
          ],
          "dayTotal": "488h"
        }
      ]
    }
  }
  </code></pre>
  
  <p>and trying to parse it with Gson:</p>
  
  <pre><code>Gson gson = new Gson();
  Book responseBean = gson.fromJson(jsonString, Book.class);
  </code></pre>
  
  <p>But the 'responceBean' is always 'null'</p>
  
  <p>Here are all the other classes:</p>
  
  <pre><code>public class Book {
  
      private List&lt;User&gt; user = new LinkedList&lt;User&gt;();
  
      public List&lt;User&gt; getUser() {
          return user;
      }
  
      public void setUser(List&lt;User&gt; user) {
          this.user = user;
      }
  }
  
  public class User {
      private String timeSpent;
      private List&lt;WorkLog&gt; worklogs = new LinkedList&lt;WorkLog&gt;();;
  
      public List&lt;WorkLog&gt; getWorklogs() {
          return worklogs;
      }
  
      public void setWorklogs(List&lt;WorkLog&gt; worklogs) {
          this.worklogs = worklogs;
      }
  
      public String getTimeSpent() {
          return timeSpent;
      }
  
      public void setTimeSpent(String timeSpent) {
          this.timeSpent = timeSpent;
      }
  }
  
  public class WorkLog{
      private String date;
      private String dayTotal;
      private List&lt;Issues&gt; issues;
  
      public String getDate(){
          return this.date;
      }
      public void setDate(String date){
          this.date = date;
      }
      public String getDayTotal(){
          return this.dayTotal;
      }
      public void setDayTotal(String dayTotal){
          this.dayTotal = dayTotal;
      }
      public List&lt;Issues&gt; getIssues(){
          return this.issues;
      }
      public void setIssues(List&lt;Issues&gt; issues){
          this.issues = issues;
      }
  }
  
  public class Issues{
      private String comment;
      private String issueCode;
      private String timeSpent;
  
      public String getComment(){
          return this.comment;
      }
      public void setComment(String comment){
          this.comment = comment;
      }
      public String getIssueCode(){
          return this.issueCode;
      }
      public void setIssueCode(String issueCode){
          this.issueCode = issueCode;
      }
      public String getTimeSpent(){
          return this.timeSpent;
      }
      public void setTimeSpent(String timeSpent){
          this.timeSpent = timeSpent;
      }
  }
  </code></pre>
  
  <p>This is my latest attempt. Somehow I cannot figure out the right way. Will be very appreciative for any help.</p>