title: Json array and retrofit
body: <p>I've this kind of json response:</p>
  
  <pre><code> {
    error: false
    stats: {
            punti: 150
            punti2: 200
           }-
   }
  </code></pre>
  
  <p>I created a <strong>StatsReceiver</strong> class:</p>
  
  <pre><code>public class StatsReceiver {
   Boolean error;
   Stats stat;
  
   public Boolean isError() {
       if (error == null)
           return true;
       else
           return error;
   }
  
   public int getPunti() {
       if (stat == null)
           return -1;
       else
           return stat.getPunti();
   }
  
   private class Stats {
       private int punti = 0;
  
       public int getPunti() {
           return punti;
       }
  
      public void setPunti(int punti) {
           this.punti = punti;
       }
  
       public int getPunti2() {
           return punti2;
       }
  
       public void setPunti2(int punti2) {
           this.punti2 = punti2;
       }
  
       private int punti2 = 0;
  
       public Stats(int punti, int punti2) {
           this.punti = punti;
           this.punti2 = punti2;
       }
   }
  }
  </code></pre>
  
  <p>Next:</p>
  
  <pre><code> @GET("/v1/stats")
   void stats(@Header("Auth") String code,
                Callback&lt;StatsReceiver&gt; object);
  </code></pre>
  
  <p>Now when I do:</p>
  
  <pre><code> apiServiceUsers.stats(apiKey, new Callback&lt;StatsReceiver&gt;() {
          @Override
          public void success(StatsReceiver statsReceiver, Response response) {
              if (statsReceiver.isError()) {
                  Toast.makeText(this, "Error", Toast.LENGTH_LONG).show();
              } else {
                  Toast.makeText(this, statsReceiver.getPunti(), Toast.LENGTH_LONG).show();
              }
          }
  </code></pre>
  
  <p>Error is <strong>false</strong> as expected, but <strong>getPunti()</strong> return always -1, so stat object is always <strong>null</strong>.</p>
  
  <p>What's wrong?</p>
  
  <p>P.S in the Log console, there is:</p>
  
  <pre><code> {"error":false,"stats":{"punti":150,"punti2":200}}
  </code></pre>