jquery ajax request returns into error event

jQuery version 1.10.1

Due to the problem of the JSON data format returned by the server, the front-end js has been entering the error event.

Correct format:

"{\"responseMsg\":\"success\"}"



Remarks:
$.ajax({
url:'/deep/sysmng/addPermRes',
async:true,
method:'POST',
contentType:' application/x-www-form-urlencoded; charset=UTF-8',
data:'resourceIds='+resourceIds,
dataType : 'json',
error:function(jqXHR,textStatus,errorThrown ){alert(errorThrown)},
success :function(resp){
alert('success');
}
});

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326747354&siteId=291194637