title: Arrays containing 10 extra null elements when parsed into POJO with GSON
body: <p>I am receiving a Json object from web api,</p>
  <p>it looks as follows:</p>
  <pre><code>{&quot;Sites&quot;:[{&quot;SiteId&quot;:1,&quot;SiteName&quot;:&quot;Site 1&quot;},{&quot;SiteId&quot;:2,&quot;SiteName&quot;:&quot;Site 2&quot;},{&quot;SiteId&quot;:3,&quot;SiteName&quot;:&quot;Site 3&quot;}]}
  </code></pre>
  <p>Now I have the following code which uses gson to parse it to a POJO:</p>
  <pre><code>@Override
  protected Response&lt;T&gt; parseNetworkResponse(NetworkResponse response) {
      try {
          String json = new String(response.data,
                  HttpHeaderParser.parseCharset(response.headers));
          return Response.success(gson.fromJson(json, clazz),
                  HttpHeaderParser.parseCacheHeaders(response));
      } catch (UnsupportedEncodingException e) {
          return Response.error(new ParseError(e));
      } catch (JsonSyntaxException e) {
          return Response.error(new ParseError(e));
      }
  }
  </code></pre>
  <p>And here is my POJO:</p>
  <pre><code> public class UsersSitesViewModel 
   {
       public List&lt;UserSite&gt; Sites;
   }
  
  public class UserSite {
  
   public UserSite(int siteId, String siteName) 
   {
      SiteId = siteId;
      SiteName = siteName;
   }
  
   public int SiteId;
   public String SiteName;
  }
  </code></pre>
  <p>But now when I run in my code and I debug to look at the pojo it created:</p>
  <p>it looks as follows:</p>
  <p><img src="https://i.stack.imgur.com/9rTfW.jpg" alt="View of instantiated POJO" /></p>
  <p>WHy is it inseting 10 Null values into my array?</p>
  <p>That is incorrect!</p>