Because the correct name for the boolean field is erfolgreich
, not isErfolgreich
. Please use the following class:
public class MsgSpielerErstellenSA {
private long id;
private boolean erfolgreich;
public MsgSpielerErstellenSA(long id, boolean isErfolgreich) {
this.id = id;
this.erfolgreich = isErfolgreich;
}
public boolean isErfolgreich() {
return erfolgreich;
}
public void setErfolgreich(boolean isErfolgreich) {
this.erfolgreich = isErfolgreich;
}
public long getId() {
return id;
}
public void setId(long id) {
this.id = id;
}
}
But if you don't want to rename this field, you can use @SerializedName("erfolgreich")
annotation on it