GSON. How to convert json object to json array?

前端 未结 7 2001
没有蜡笔的小新
没有蜡笔的小新 2021-02-08 15:20

Now I am getting this JSON from API:

{\"supplyPrice\": {
        \"CAD\": 78,
        \"CHF\": 54600.78,
        \"USD\": 20735.52
      }}

But

7条回答
  •  眼角桃花
    2021-02-08 16:03

    You can directly convert it to an HashMap or TreeMap then navigate your map for all the keys.

    This will be simplest way to achieve what you want.

提交回复
热议问题