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

后端 未结 3 1378
北恋
北恋 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:49

    I hope this helps. Just learnt it yesterday :)

    JSONObject foo = yourJSONOject;
    String uid = foo.get("CNo").isString().toString();
    String type = foo.get("CName").isString().toString();
    .
    . //for each Key field.
    

    I am not sure why you have put the escapes in the string, but you can call append() and get the OP as you want it.

提交回复
热议问题