我收到“错误 #1132:无效的 JSON 解析输入”并且不明白为什么。
我的 json 是由 php 生成的:json_encode($x)。如果在 TextArea(flex) 中显示,则输出 json 显示如下:
{
"title":"The Incredibles",
"year":"2004",
"type":"movie",
"id":"9806",
"imdb_id":"tt0317705",
"rating":8.6,
"tagline":"No gut, no glory",
"overview":"Bob Parr has given up his superhero days to log in time as an insurance adjuster and raise his three children with his formerly heroic wife in suburbia. But when he receives a mysterious assignment, it\\'s time to get back into costume.",
"runtime":115,
"budget":92000000,
"image":"http:\/\/cf2.imgobject.com\/t\/p\/w185\/jjAgMfj0TAPvdC8E5AqDm2BBeYz.jpg",
"trailer":"rMfrFG_69zM"
}
我用几个验证器进行了验证,他们都说它是有效的 json。
在 flex 方面,我正在尝试使用以下代码访问 json:
JSON.parse(event.result.toString());
但得到错误。有人遇到过这个问题吗?
编辑1:
似乎概述行是问题所在,但我不明白为什么,因为我使用了 php json_encode 应该正确转义的东西......