我用 JSONLint 验证了这个 JSON,当我的脚本的第 25 行运行时,它看起来像:
$temp = json_decode( $obj->hints,true );
我得到一个:
解析错误:语法错误,第25行C:\Program Files (x86)\Zend\Apache2\htdocs\crosswords\query.blockouts.php中的意外 'hintscross' (T_STRING)
出来剧本。我想知道如何使这个解析错误消失。这是 JSON:
{
"hintsacross": [
{ "number": "1", "hinttext": "Hurt", "hintsquare": "A1" },
{ "number": "5", "hinttext": "Make a selection", "hintsquare": "A6" },
{ "number": "8", "hinttext": "Frank", "hintsquare": "A10" } ],
"hintsdown": [
{ "number": "1", "hinttext": "First Greek letter", "hintsquare": "A1" },
{ "number": "2", "hinttext": "Used footnotes", "hintsquare": "A2" },
{ "number": "3", "hinttext": "Listened to", "hintsquare": "A3" } ]
}
提前致谢...