Override toString method of User class to return JSON output.
This commit is contained in:
@@ -52,4 +52,15 @@ public class User extends Entity {
|
|||||||
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