我遇到了ajax / json的问题
Php json_encode()
生成了这个json代码:
[{"createdDate":"2013-08-16 13:23:35","body":"kpk"},
{"createdDate":"2013-08-16 13:20:18","body":"iji"},
{"createdDate":"2013-08-16 13:17:34","body":"kp"},
{"createdDate":"2013-08-16 13:17:16","body":"kp"},
{"createdDate":"2013-08-16 13:15:11","body":"koml"},
{"createdDate":"2013-08-16 13:14:08","body":"lplpp,"},
{"createdDate":"2013-08-16 13:13:59","body":"lplpp,"},
{"createdDate":"2013-08-16 13:10:51","body":"mpmkp"},
{"createdDate":"2013-08-16 13:10:29","body":"ook"},
{"createdDate":"2013-08-16 13:07:48","body":"oomoloo"}]
但我不断收到意外的令牌错误,有人可以向我解释原因吗?
当我尝试解析json字符串时抛出错误 通过以下方式:
function ajax_callback(mex)
{
mexx = JSON.parse(mex);
//other stuff
}
答案 0 :(得分:0)