//处理不标准的json数据
public static String getMatcher( String str) {
if (str == null || str.isEmpty()) {
return str;
}
Pattern p = Pattern.compile("\\s+|\\u00A0");
Matcher m = p.matcher(str);
String parsed = m.replaceAll("");
return parsed.replaceAll("\\\\n", "");
}
【处理不标准的JSON字符串,以便转为JSONObject对象】
最新推荐文章于 2024-09-01 23:05:35 发布