I m new to Python and JSON, so I m sorry if I sound clueless. I m getting the following result from the Google Translate API and want to parse out the value of "translatedText":
{
"data": {
"translations": [
{
"translatedText": "Toute votre base sont appartiennent à nous"
}
]
}
}
这种反应只是作为一种扼杀手段储存的:
response = urllib2.urlopen(translateUrl)
translateResponse = response.read()
所以,我所希望的是,得到翻译的文本,并将其储存在一个变量中。 我先搜查了Salph Docs,但似乎这样令人困惑,似乎不认为JSON是一种简单的扼杀,而不是一些超级冷却目标。