JSon Retrofit Malformed

1

I'm getting my return on json like this:

{
    "success": 1,
    "email": "[email protected]"
}

But the retrofit is saying it's malformed:

It gives the following message:

  

use JsonReader.setLenien (true) to accept malformed JSON at line 1   column 1 path $

My message class looks like this:

import com.google.gson.annotations.SerializedName;
public class RetornoMensagem {


    @SerializedName("success")

    private Integer success;
    @SerializedName("email")

    private String email;

    public Integer getSuccess() {
        return success;
    }

    public void setSuccess(Integer success) {
        this.success = success;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

}

I would like to see how you're returning in the retrofit also on Throwable t

    
asked by anonymous 11.08.2017 / 16:10

0 answers