PHPで配列やオブジェクトを含むjson文字列をデコードしたい。でデコードしたとき
$array = json_decode($json, true);
print_r($array);
NULL を返します。PHPでjsonをデコードする方法を教えてください。これは私のjson文字列です。
{
success: 1,
message: "Successful!",
save_date: "2013-09-11 04:09:26",
test: [
{
test_id: "1",
test_date: "2013-09-12",
test_name: "Test 1"
},
{
test_id: "2",
test_date: "2013-09-11",
test_name: "Test 2"
}
]
}