A double quote even if escaped is throwing parse error. look at the code below
//parse the json in javascript var testJson = \'{\"result\": [\"lunch\",
Turn off magic_quotes_gpc in php.ini.
magic_quotes_gpc