The problem is that field "roles" is a select list with multiple-choice, so the field has to be converted into an array. I could not find any piece of info about how to do it. Need help. I'm doing this:
$.ajax({
url: '/api/users',
async: true,
dataType: 'json',
contentType: "application/json",
type: "PUT",
data: {
id : jQuery('#id').val(),
username: jQuery('#username').val(),
password: jQuery('#password').val(),
roles :
},
})