Remove all occurrences of \ from string

后端 未结 6 1266
挽巷
挽巷 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:50

    Just use:

    try {
            jsonFormattedString = new JSONTokener(jsonString).nextValue().toString();
        } catch (JSONException e) {
            e.printStackTrace();
        }
    

    See documentation

提交回复
热议问题