Convert JSONObject to Map

后端 未结 6 1907
抹茶落季
抹茶落季 2020-12-08 18:20

I have a JSONObject with some attributes that I want to convert into a Map

Is there something that I can use from the

6条回答
  •  甜味超标
    2020-12-08 18:53

    You can use Gson() (com.google.gson) library if you find any difficulty using Jackson.

    HashMap yourHashMap = new Gson().fromJson(yourJsonObject.toString(), HashMap.class);
    

提交回复
热议问题