I am trying to get the data in a JSON object (which I checked is correctly formatted) and output the data to the firebug console. I checked JSON with JSONLint (http://jsonlint.com/) and I know that the data is not returned in the JSON object, because when I register it, it is registered as text, not an object. When I look at the ajax post, there is a JSON tab and it shows an object, I just can't get it for some reason.
My ajax call
$.ajax({
url:'/coords/base',
data: { type: obj.type, id: obj.id },
dataType:'text',
type:'get',
async:false,
success: function(data) {
console.log(data);
}
});
My return data looks like this:
{
"1": {"name":"TEXT","coords":[
{ "entry":3,"x":15,"y":15 }
]}}
AJAX .responseText; AJAX. , $.serialize() $.parseJSON(), "uncaught exception: , ".
responseText JSON . , .
.