I have an error in Javascript
SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
...n.now(),dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")},n.parseXML=func...
And this is my JavaScript, which gets string from server response
complete: function(response) {
var results = $.parseJSON(response.responseText);
Error is in the second line because without that line there's no error)
My PHP script: (I use CodeIgniter)
$str = json_encode($results);
$this->output->set_output($str);
And an example of the message from server:
{"Thumb_image":"http:\/\/example.com\/img\/thumbs\/9b4138094cb32af906e32f9d033d4748.jpg","Big_image":"http:\/\/example.com\/img\/photos\/9b4138094cb32af906e32f9d033d4748.jpg","Error":""}
Help me please. Why this code is working wrong?