この JSON を JSONLint で検証し、スクリプトの 25 行目を実行すると、次のようになります。
$temp = json_decode( $obj->hints,true );
私は得ています:
解析エラー: 構文エラー、C:\Program Files (x86)\Zend\Apache2\htdocs\crosswords\query.blockouts.php行25の予期しない 'hintsacross' (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" } ]
}
前もって感謝します...