Override toString method of User class to return JSON output.
This commit is contained in:
@@ -51,5 +51,16 @@ public class User extends Entity {
|
|||||||
public void setOrganization(String organization) {
|
public void setOrganization(String organization) {
|
||||||
this.organization = organization;
|
this.organization = organization;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
StringBuffer output = new StringBuffer();
|
||||||
|
output.append("{id: ").append(getId())
|
||||||
|
.append(", name: ").append(getName())
|
||||||
|
.append(", full_name: ").append(getFullName())
|
||||||
|
.append(", disabled: ").append(isDisabled())
|
||||||
|
.append("}");
|
||||||
|
return output.toString();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user