I\'m trying to use jQuery and Ajax and I use this method. but I get the error $.toJSON is not a function in my firebug . where is the problem? I use jquery 1.3.2 . thanks >
You are already included jquery, there is no reason to use any other library, just use $.parseJSON(a_json_string) :
var error_json_string = '{"error":{"message":"message blablabla","type":"","code":""}}';
var error_json_obj = $.parseJSON(error_json_string);
alert(error_json_obj.error.message);
Source : http://api.jquery.com/jquery.parsejson/