I am using jquery-1.7.1 version, my ajax call is as below,
var url = "getrequest.do?method=getTemplates";
$.ajax({
url : url,
type : "GET",
dataType : 'text',
success:function(response){
var templates = jQuery.parseJSON(response);
}
});
My Response for this ajax call is :
{"response":{"result":{"templates":true},"uri":"/api/private/json/templates"}}
The parseJSON method throws an parsing error, when i use jquery-1.7.1, but it works fine with jquery.1.5.1.
Can some one help me to debug this issue.
Thanks in advance
Ram
Simply you can change
dataTypelike:and you don’t need to
$.parseJSON(), jQuery will do it for you.CODE