Issue with parse json to java object using gson

后端 未结 2 491
旧巷少年郎
旧巷少年郎 2021-01-12 21:36

I want to parse json data into java object using google-gson.

Here is an example of the data I want to parse:

  {\"isBean\":{\"userName\":\"test\",\         


        
2条回答
  •  一整个雨季
    2021-01-12 22:12

    The problem is solved With the help of Stackoverflow Answer.

    Create gson object:

    Gson gson = new GsonBuilder().registerTypeAdapter(IsBean.class, new InterfaceAdapter()).create();
    

提交回复
热议问题