title: How to parse JSON arrays with retrofit
body: <p>So I have a retrofit interface:</p>
  
  <pre><code>public interface RestUserInformation {
      @GET("/api/me")
      void getInfo(Callback&lt;UserInformation&gt; callback);
  }
  </code></pre>
  
  <p>A RestAdapter:</p>
  
  <pre><code>RestAdapter userInformation = newRestAdapter.Builder()
                                .setEndpoint(IP_ADDRESS)
                                .setRequestInterceptor(requestInterceptor)
                                .build();
  </code></pre>
  
  <p>Which make API calls and receive a JSON body answer like:</p>
  
  <pre><code>{"user":{ 
       "id":50,
       "email":"mail@mail.com",
       "first_name":"chris",
       "last_name":"cr",
       "birthdate":"1817-03-04",
       "gender":1,
       "country":"fr"
       {     
       "id":8,
       "language":"Spanish",
       "flag_path":"public/images/flags/Argentina.ico",
       "created_at":"2014-11-05T20:42:39.294Z",
       "updated_at":"2014-11-05T20:42:39.294Z",
       "name":"Argentina","available":false,
       "i18n_key":null
       }
      }
  }
  </code></pre>
  
  <p>And I'd like to parse it and fill a class with it, so I created the class UserInformation.java:</p>
  
  <pre><code>public class UserInformation {
      int id;
      String email;
      String first_name;
      String last_name;
      String birthdate;
      int gender;
      String country;  }
  </code></pre>
  
  <p>I've been trying to do this using the callback function:</p>
  
  <pre><code>        RestUserInformation getUserInfo = userInformation.create(RestUserInformation.class);
          getUserInfo.getInfo(new Callback&lt;UserInformation&gt;() {
                 @Override
                 public void success(UserInformation user, Response response) {
                                              }
  
                 @Override
                 public void failure(RetrofitError error) {
                                              }
                                          });
  </code></pre>
  
  <p>I have tried many things but it doesn't work and the attribute of the UserInformation class stay empty..
  Any ideas about how to do it?</p>