How to get json array values in android?

前端 未结 3 741
-上瘾入骨i
-上瘾入骨i 2021-01-01 01:05

JSON response value looks like this \"types\" : [ \"sublocality\", \"political\" ]. How to get the first value of the types or how to get the word sublocality?<

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-01 01:29

    You should parse that JSON to get those values. You can either use JSONObject and JSONArray classes in Android or use a library like Google GSON to get the POJOs from JSON.

提交回复
热议问题