1
我無法得到我的jQuery腳本的有效響應。json_encode不生成我需要的JSON表格
我的迴應:
{
"success": true,
"data": {
"attack": null,
"shield": null,
"speed": null,
"cargo": null,
"upg_slots": "1"
}
}
代碼:
echo json_encode(array(
'success' => true,
'data' => array(
'attack' => null,
'shield' => null,
'speed' => null,
'cargo' => null,
'upg_slots' => "1"
)
));
有效響應:
{
"success": true,
"data": [
{
"attack": null,
"shield": null,
"speed": null,
"cargo": null,
"upg_slots": "1"
}
]
}
提前感謝!
我知道JSON功能強大,但是「神形」? – Blazemonger 2013-02-18 21:37:48