title: Retrofit/Jackson error on deserializing
body: <p>i'm trying to get a JSON from my web service and deserialize to my class UserSync, but i'm getting the following error: </p>
  
  <p><strong>Can not instantiate value of type [simple type, class com.example.breno.teste.model.User] from String value (''); no single-String constructor/factory method
                                                                                 at [Source: okhttp3.ResponseBody$BomAwareReader@fbf814f; line: 1, column: 86] (through reference chain: com.example.breno.teste.dto.UserSync["user"])</strong></p>
  
  <p>I've read some posts saying that i need to declare my User class static in UserSync, but when i do that, jackson can't find any user property, even with JsonDescription. Another posts say that i may need to declare a default constructor, so i did.</p>
  
  <p>Here is the UserSync class:</p>
  
  <pre><code>@JsonIgnoreProperties(ignoreUnknown = true)
  public class UserSync {
      @JsonProperty("status")
      private String Status;
      @JsonProperty("currentDate")
      private String CurrentDate;
      @JsonProperty("message")
      private String Message;
      @JsonProperty("user")
      private static User NewUser;
  
      public UserSync() {
      }
  
      public String getStatus() {
          return Status;
      }
  
      public String getCurrentDate() {
          return CurrentDate;
      }
  
      public String getMessage() {
          return Message;
      }
  
      public static User getNewUser() {
          return NewUser;
      }
  </code></pre>
  
  <p>The User class: </p>
  
  <pre><code>public class User implements Serializable {
      @JsonProperty("userKey")
      private UUID UserKey;
      @JsonProperty("userPassword")
      private String UserPassword;
      @JsonProperty("userGroupKey")
      private UUID UserGroupKey;
      @JsonProperty("signInDate")
      private String SignInDate;
      @JsonProperty("active")
      private boolean Active;
      @JsonProperty("profilePicturePath")
      private String ProfilePic;
      @JsonProperty("completeName")
      private String UserCompleteName;
      @JsonProperty("email")
      private String UserEmail;
      @JsonProperty("isLogged")
      private boolean IsLogged;
  
      public User() {
      }
  
      public boolean getIsLogged() {
          return IsLogged;
      }
  
      public void setIsLogged(boolean isLogged) {
          IsLogged = isLogged;
      }
  
      public String getUserEmail() {
          return UserEmail;
      }
  
      public void setUserEmail(String userEmail) {
          UserEmail = userEmail;
      }
  
      public UUID getUserKey() {
          return UserKey;
      }
  
      public void setUserKey(UUID userKey) {
          UserKey = userKey;
      }
  
      public String getUserPassword() {
          return UserPassword;
      }
  
      public void setUserPassword(String userPassword) {
          UserPassword = userPassword;
      }
  
      public UUID getUserGroupKey() {
          return UserGroupKey;
      }
  
      public void setUserGroupKey(UUID userGroupKey) {
          UserGroupKey = userGroupKey;
      }
  
      public String getSignInDate() {
          return SignInDate;
      }
  
      public void setSignInDate(String signInDate) {
          SignInDate = signInDate;
      }
  
      public boolean getActive() {
          return Active;
      }
  
      public void setActive(boolean active) {
          Active = active;
      }
  
      public String getProfilePic() {
          return ProfilePic;
      }
  
      public void setProfilePic(String profilePic) {
          ProfilePic = profilePic;
      }
  
      public String getUserCompleteName() {
          return UserCompleteName;
      }
  
      public void setUserCompleteName(String userCompleteName) {
          UserCompleteName = userCompleteName;
      }    
  }
  </code></pre>
  
  <p>My service class (Using now the postNewUser):</p>
  
  <pre><code>public interface UserService {
  @GET("Login/LoginUser?")
  Call&lt;UserSync&gt; login(@Query("email") String email, @Query("password") String password);
  
  //region NewUser Services
  @GET("Login/VerifyNewUser?")
  Call&lt;UserSync&gt; validateNewUser(@Query("email") String email);
  
  @POST("Login/PostNewUser")
  Call&lt;UserSync&gt; postNewUser(@Body User user);
  //endregion
  }
  </code></pre>
  
  <p>And finally, the JSON: </p>
  
  <pre><code>{
    "status": "OK",
    "currentDate": "20/07/2017 11:59:02",
    "message": "teste",
    "user": {
      "userKey": "8e2f0d2d-3522-472d-be1d-28791367f4ee",
      "email": "teste_teste@hotmail.com",
      "userPassword": "123456",
      "profilePicturePath": "teste",
      "completeName": "Jorge",
      "userGroupKey": null,
      "signInDate": "2017-07-07T16:26:06.097",
      "active": true,
      "isLogged": true
    }
  }
  </code></pre>
  
  <p>Can someone help me, please?</p>
  
  <p><strong>EDIT 1</strong> - Here is the method that i'm using to do the retrofit call:</p>
  
  <pre><code>public void register(User user) {
          Call&lt;UserSync&gt; postCall = new RetrofitInitializator().getUserService().postNewUser(user);
          postCall.enqueue(getRegisterCallback());
      }
  
  @NonNull
      private Callback&lt;UserSync&gt; getRegisterCallback() {
          return new Callback&lt;UserSync&gt;() {
              @Override
              public void onResponse(Call&lt;UserSync&gt; call, Response&lt;UserSync&gt; response) {
                  User user = response.body().getNewUser();
              }
              @Override
              public void onFailure(Call&lt;UserSync&gt; call, Throwable t) {
                  Log.e("Register - onFailure", t.getMessage());
              }
          };
      }
  </code></pre>
  
  <p><strong>EDIT 2</strong> - The retrofitInicializator class:</p>
  
  <pre><code>public class RetrofitInitializator {
      private final Retrofit retrofit;
  
      public RetrofitInitializator() {
          HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();
          interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);
  
          OkHttpClient.Builder builder = new OkHttpClient
                  .Builder();
          builder.addInterceptor(interceptor);
  
          retrofit = new Retrofit.Builder()
                  .baseUrl("http://192.168.15.6:7071/api/")
                  .addConverterFactory(JacksonConverterFactory.create())
                  .client(builder.build())
                  .build();
      }
  
      public UserService getUserService() {
          return retrofit.create(UserService.class);
      }
  }
  </code></pre>