我要写出这个JSON响应所有的变量:如何逃脱字符时读取JSON
"result": {
"\/common\/topic\/weblink": [
{
"url": "http:\/\/www.boardgamegeek.com\/boardgame\/13",
"description": "BoardGameGeek"
}
],
"id": "\/en\/settlers_of_catan"
}
所以拿到ID:
result.id
可是我怎么获取值为“\/common \/topic \/weblink”?
您目前使用哪些库来处理json? – 2010-12-19 19:54:57
我正在使用Freebase-Python:http://code.google.com/p/freebase-python/ – 2010-12-19 20:19:47
根据Freebase-Python中提供的示例,这应该起作用 - result [“\/common \/topic \/weblink“] [”url“] - 但它会抛出错误, - TemplateSyntaxError:无法解析余数:[”\/common \/topic \/weblink“] [”url“] – 2010-12-19 20:22:53