나는이 데이터를 얻고 싶지만 혼란스럽고 어떻게해야하는지 알고 싶습니다. 다리에 접근하고 싶습니다. 다리 거리에서 텍스트. 그런 다음 단계를 수행 한 후 다시 거리를두고 텍스트를 입력하십시오. "루트"에서Json 안드로이드에서 여러 객체 가져 오기
은> "다리"== -> 거리 -> 다음
텍스트
는 단계 "루트"==> "다리"==> "단계를"운전하세요 -> 거리 -> 텍스트처음에는 개체가 너무 커서 혼란스러운 개체가 다시 있습니다. 어떤 도움을 주시면 감사하겠습니다.
{
"geocoded_waypoints" : [
{
"geocoder_status" : "OK",
"place_id" : "ChIJ2QeB5YMEGTkRYiR-zGy-OsI",
"types" : [ "locality", "political" ]
},
{
"geocoder_status" : "OK",
"place_id" : "ChIJ2afeeFcxOzkRL9RVTscv17o",
"types" : [ "locality", "political" ]
}
],
"routes" : [
{
"bounds" : {
"northeast" : {
"lat" : 31.55462439999999,
"lng" : 74.3571711
},
"southwest" : {
"lat" : 30.1981178,
"lng" : 71.4687352
}
},
"copyrights" : "Map data ©2016 Google",
"legs" : [
{
"distance" : {
"text" : "348 km",
"value" : 347978
},
"duration" : {
"text" : "4 hours 49 mins",
"value" : 17335
},
"end_address" : "Multan, Pakistan",
"end_location" : {
"lat" : 30.1981178,
"lng" : 71.4687352
},
"start_address" : "Lahore, Pakistan",
"start_location" : {
"lat" : 31.55462439999999,
"lng" : 74.3571711
},
"steps" : [
{
"distance" : {
"text" : "67 m",
"value" : 67
},
"duration" : {
"text" : "1 min",
"value" : 9
},
"end_location" : {
"lat" : 31.5549532,
"lng" : 74.3565735
},
"html_instructions" : "Head \u003cb\u003enorthwest\u003c/b\u003e on \u003cb\u003eAllama Iqbal Rd\u003c/b\u003e",
"polyline" : {
"points" : "k_r_Ei{ydM[[email protected]@bA"
},
"start_location" : {
"lat" : 31.55462439999999,
"lng" : 74.3571711
},
"travel_mode" : "DRIVING"
},
내가 걱정이에 대한 GSON, 아무것도를 사용하고 쉽게 당신이 원하는 경우에 나는 당신에게 예를 수) = 사용. 아니면 먼저 읽으려고합니까? –
은 http://stackoverflow.com/questions/17673057/how-to-parse-this-nested-json-array-in-android를 참조하십시오. – sasikumar