我試圖解碼JSON陣列,但是我得到以下錯誤:PHP:問題解碼JSON陣列
Object of class stdClass could not be converted to string
的JSON編碼數組如下所示:
echo json_decode('{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
149.23531999999997,
-35.352484
]
},
"properties": {
"Fcilty_typ": "MO",
"gx_id": "1"
}
}
]
}'
);
我爲了保持這個查詢的更緊湊,我已經將一些字段從這裏剝離出來。任何人都可以提出問題在這裏?
感謝
答案已經存在問題.. json_decode將返回對象沒有字符串 –