title: how to get a subobject from json response
body: <p>i'm trying to retrieve an inner object from a json response, my json pojo looks like this:</p>
  
  <pre><code>public class Pojo {
      private String token;
      private User user;
  
      public Pojo()
      {}
      public Pojo(String username, String password,User user) {
          user.setUsername(username);
          user.setPassword(password);
          this.user = user;
      }
  
      public String getToken() {return token;}
      public void setToken(String token) {this.token = token;}
      public User getUser() {return user;}
      public void setUser(User user) {this.user = user;}
  </code></pre>
  
  <p>and my innerobjct User looks like this:</p>
  
  <pre><code>    public class User {
  
              private String username
  
  ;
          private String name;
          private String phone;
          private String email;
          private String password;
          private String is_Active;
  }
  </code></pre>
  
  <p>with their setters and getters</p>
  
  <p>this is my login code:</p>
  
  <pre><code>public void onLogin(View view){
  
          final ProgressDialog dialog = ProgressDialog.show(this, "", "loading...");
          EndpointInterface loginService = ServiceAuthGenerator.createService(EndpointInterface.class);
          Password = tv_Password.getText().toString();
          Username = tv_Username.getText().toString();
          User usr = new User();
          Pojo user = new Pojo(Username,Password,usr);
          Call&lt;Pojo&gt; call = loginService.getToken(usr);
          call.enqueue(new Callback&lt;Pojo&gt;() {
              @Override
              public void onResponse(Response&lt;Pojo&gt; response, Retrofit retrofit) {
                  dialog.dismiss();
                  if (response.isSuccess()) {
                      Pojo user = response.body();
                      if(user.getUser().getIs_Active()=="True") {
                          Intent intent = new Intent(getApplicationContext(), MainMenu.class);
                          startActivity(intent);
                      }
                      else{
                          Toast.makeText(getApplicationContext(), "Wrong User or Password", Toast.LENGTH_SHORT).show();
                      }
                  }
              }
              @Override
              public void onFailure(Throwable t) {
                  dialog.dismiss();
                  Toast.makeText(getApplicationContext(), "Error Conection", Toast.LENGTH_SHORT).show();
              }
          });
      }
  </code></pre>
  
  <p>the response is comming like this:</p>
  
  <pre><code>{
  "token":"tokengfsgfds"
  "user":{
     "username":"exmplename"
     "email":"@gomail.com"
     "is_active":"True"
      }
  }
  </code></pre>
  
  <p>i can retrieve the token, but when i try to get variables from the user inner object my app fails. thanks!</p>