This question has already been answered:
- How to parse json with gson? 3 replies
From the server I get the following Json:
{ "type": "FeatureCollection", "properties": { "Attribution": { "Sources": { "yandex": { "id": "yandex", "author": { "name": "Яндекс", "uri": "https:\/\/www.yandex.ru" } } } }, "ResponseMetaData": { "SearchRequest": { "request": "Веломастерская,ремонт велосипедов", "results": 1, "skip": 0, "boundedBy": [ [ 37.048426749999997, 55.436448290000001 ], [ 38.175902260000001, 56.046901239999997 ] ] }, "SearchResponse": { "found": 80, "Point": { "type": "Point", "coordinates": [ 23.820850969999999, 53.669822070000002 ] }, "boundedBy": [ [ 23.81916214, 53.668824499999999 ], [ 23.822539800000001, 53.670819620000003 ] ], "display": "multiple" } } }, "features": [ { "type": "Feature", "properties": { "id": "1", "CompanyMetaData": { "id": "1153226678", "name": "Веломастерская", "nameHighlight": [ [ 0, 14 ] ], "address": "Гродно, ул. Советских Пограничников, 51\/1", "Categories": [ { "name": "Ремонт велосипедов" } ], "Phones": [ { "type": "phone", "formatted": "+375 (29) 785-43-26", "country": "375", "prefix": "29", "number": "7854326" } ], "Hours": { "Availabilities": [ { "Monday": true, "Tuesday": true, "Wednesday": true, "Thursday": true, "Friday": true, "Intervals": [ { "from": "17:00:00", "to": "20:00:00" } ] } ], "text": "пн-пт 17:00–20:00", "tzOffset": 10800 }, "Geo": { "precision": "exact" } }, "description": "Гродно, ул. Советских Пограничников, 51\/1", "name": "Веломастерская", "boundedBy": [ [ 23.812622399999999, 53.66493534 ], [ 23.829079539999999, 53.67470823 ] ], "attributions": [ "#yandex" ] }, "geometry": { "type": "Point", "coordinates": [ 23.820847000000001, 53.669820000000001 ] }, "geometries": [ { "type": "Point", "coordinates": [ 23.820847000000001, 53.669820000000001 ] } ] } ] }
I'm interested in the Name, address and formatted fields.
PS You can sample code