我正在开发一个 android 应用程序,该应用程序向 google 地方(详细信息)发出请求并获得一个 json 对象作为回报。这是对象https://developers.google.com/places/documentation/details#PlaceDetailsResponses
`{
"html_attributions" : [],
"result" : {
"address_components" : [
{
"long_name" : "48",
"short_name" : "48",
"types" : [ "street_number" ]
},
{
"long_name" : "Pirrama Road",
"short_name" : "Pirrama Road",
"types" : [ "route" ]
},
{
"long_name" : "Pyrmont",
"short_name" : "Pyrmont",
"types" : [ "locality", "political" ]
},
{
"long_name" : "NSW",
"short_name" : "NSW",
"types" : [ "administrative_area_level_1", "political" ]
},
{
"long_name" : "AU",
"short_name" : "AU",
"types" : [ "country", "political" ]
},
{
"long_name" : "2009",
"short_name" : "2009",
"types" : [ "postal_code" ]
}
],
"events" : [
{
"event_id" : "9lJ_jK1GfhX",
"start_time" : 1293865200,
"summary" : "<p>A visit from author John Doe, who will read from his latest book.</p>
<p>A limited number of signed copies will be available.</p>",
"url" : "http://www.example.com/john_doe_visit.html"
}
], ETC`
如何从该 json 中获取特定详细信息。如果我尝试json.getJSONArray("result")
它告诉我 json 不是来自该类型,或者如果我尝试json.getString("results")
它说结果没有价值。那么如何提取信息,例如 short_name 等?
提前致谢