title: GSON fromJson to POJO gets null fields
body: <p>I am using <code>Google.GSON</code> library for deserialize a JSON file into POJO called <code>Account</code>. 
  I have looked at most of the articles here but the POJO object I get from <code>.fromJson</code> has null fields. </p>
  
  <p>Here is my Code:</p>
  
  <pre><code>import java.io.*;
  import java.util.*;
  import com.google.gson.*;
  import com.google.gson.stream.JsonReader;
  
  public class lastTest {
  
      public static void main(String[] args) throws IOException {
  
          ArrayList&lt;Account&gt; Customers = new ArrayList&lt;Account&gt;();
          try {
                  JsonReader jRead = new JsonReader(new FileReader("myJson3.json"));
  
           //   InputStreamReader jRead = new InputStreamReader(new FileInputStream("myJson3.json"));
  
                  Account a = new Gson().fromJson(jRead, Account.class);
                  Customers.add(a);
  
                  System.out.println(Customers.toString());
  
          }
          catch (FileNotFoundException e) {
              System.out.print("File not found!");
          }
      }
  }
  </code></pre>
  
  <p>Account class looks like this:</p>
  
  <pre><code>public class Account
  {
      private String name;
      private String number;
      private String address1;
      private String city;
      private String state;
      private String zip;
  
      public String getZip (){
          return zip; }
  
      public void setZip (String zip){
          this.zip = zip; }
  
      public String getName (){
          return name; }
  
      public void setName (String name){
          this.name = name; }
  
      public String getState (){
          return state; }
  
      public void setState (String state){
          this.state = state; }
  
      public String getAddress1 (){
          return address1; }
  
      public void setAddress1 (String address1){
          this.address1 = address1; }
  
      public String getNumber (){
          return number; }
  
      public void setNumber (String number){
          this.number = number; }
  
      public String getCity () {
          return city; }
  
      public void setCity (String city){
          this.city = city; }
  
  @Override
      public String toString()
      {
          return "zip = "+zip+", name = "+name+", state = "+state+", address1 = "+address1+", number = "+number+", city = "+city;
      }
  }
  </code></pre>
  
  <p>and my JSON file looks like this:</p>
  
  <pre><code>{
      "1": {
          "account": {
              "address1": "1234 Golf Drive", 
              "city": "Santa Clara", 
              "name": "John Smith", 
              "number": "123445577", 
              "state": "CA", 
              "zip": "95050"
          }, 
          "comparison": {
              "data": [
                  .
                  .
                  .
              ], 
              "buffer": "true"
          },  
          "month": "5", 
          "locale": "en_us", 
          "period": "April 30, 2014 - May 31, 2015",
          "service": {
              "address": "1234 Golf Drive", 
              "city": "Santa Clara", 
              "name": "John Smith", 
              "state": "CA", 
              "zip": "95050"
          }
      }
  }
  </code></pre>
  
  <p>When trying to print the instance variables of my POJO, they are all null.</p>
  
  <p>Output I get:</p>
  
  <pre><code>[zip = null, name = null, state = null, address1 = null, number = null, city = null]
  </code></pre>