RoleAPI roleAPI = APILocator.getRoleAPI();
if(map != null) {
for (String key : map.keySet()) {
Role r = roleAPI.loadRoleById(key);
JSONObject jsonObject = new JSONObject();
jsonObject.put("id", r.getId().replace('-', '_'));
jsonObject.put("name", UtilMethods.javaScriptify(r.getName()));
jsonObject.put("locked", r.isLocked());