1
我想解析一个JSON文件使用PHP和json_decode,但是我有difficulting这样做时返回的JSON名称空间。例如:PHP json_decode - 处理命名空间
$json_ouput = json_decode($json);
foreach ($json_ouput->feed as $feed) {
/*
Here is the problem, $feed contains a namespaced key
$feed->ab:test->value // Does not work :(
*/
}
请告诉我这里最好的解决方案?
'%json_output'?在那里做'%'是什么?你能向我们展示一些你正在使用的JSON吗? – Sampson
用$替换%,然后重试! –
这看起来不像PHP。 –