Json串中带转义字符,去除反斜杠

 输入:

String s1="{\"MsgId\":1,\"TotalCount\":10,\"FilterCount\":8,\"SentCount\":7,\"ErrorCount\":1}";
System.out.println(StringEscapeUtils.unescapeJava(s1));

输出:

{"MsgId":1,"TotalCount":10,"FilterCount":8,"SentCount":7,"ErrorCount":1}

 

 

你可能感兴趣的:(方法工具)