how to convert json object to string in android..?

后端 未结 3 1377
北恋
北恋 2021-01-02 09:02

I want to convert from JSONObject

{\"CNo\":80,\"CName\":\"ganesh\",\"CMail\":\"ganesh@ganesh.com\",\"CMailType\":\"home\",\"CPhNo\":9878987776,\"C

3条回答
  •  情话喂你
    2021-01-02 09:42

    Below code will convert the given JsonObject to string.

    Gson gson = new Gson();
    String bodyInStringFormat = gson.toJson(passYourJsonObjectHere);
    

提交回复
热议问题