*/
protected String serializeUserAsJson(RequestContext context,User user) throws IdentityException, NamingException{
String usersJson = "{ \"attributes\": [";
UserAttributeMap attributes = user.getProfile();
boolean first = true;
List<String> sortedKeys=new ArrayList<String>(attributes.keySet());
// Collections.sort(sortedKeys); TODO to sort or not ?
for(int i=0; i <sortedKeys.size(); i++){
UserAttribute attr = attributes.get(sortedKeys.get(i));
String key = Val.chkStr(msgBroker.retrieveMessage("catalog.identity.profile.label." + attr.getKey()));
String value = "";