Remove all occurrences of \ from string

后端 未结 6 1265
挽巷
挽巷 2020-12-03 03:12

I am trying to get an array of objects from the server, using JSON.

The server sends me the following string.

\"[{\\\"DealComment\\\":null,\\\"DealVo         


        
6条回答
  •  臣服心动
    2020-12-03 03:32

    jsonObj.toString()
            .replace("\"[", "[").replace("]\"", "]")
            .replace("\\\"{", "{").replace("}\\\"", "}")
            .replace("\\\\\\\"", "\"")
    

提交回复
热议问题