private static final String PARAM_LOGIN = "login";
+ private static final String FIELD_ID = "id";
private static final String FIELD_NAME = "name";
private static final String FIELD_DESCRIPTION = "description";
private static final String FIELD_SELECTED = "selected";
json.name("groups").beginArray();
for (GroupMembershipDto group : groups) {
json.beginObject()
+ .prop(FIELD_ID, group.getId().toString())
.prop(FIELD_NAME, group.getName())
.prop(FIELD_DESCRIPTION, group.getDescription())
.prop(FIELD_SELECTED, group.getUserId() != null)
"ps": 25,
"total": 2,
"groups": [
- {"name": "sonar-admins", "description": "Sonar Admins", "selected": false},
- {"name": "sonar-users", "description": "Sonar Users", "selected": true}
+ {"id": "2", "name": "sonar-admins", "description": "Sonar Admins", "selected": false},
+ {"id": "1", "name": "sonar-users", "description": "Sonar Users", "selected": true}
]
}