List of utility methods to do JSON Remove
String | removeJsonPoint(String json, String... points) remove Json Point String result = json; int len = points.length; for (int i = 0; i < len; i++) { int index = json.indexOf("\"" + points[i] + "\""); result = json.substring(0, index); int index2 = json.indexOf("\",", index); result += json.substring(index2 + 2); json = result; ... |
String | replace(String str, JSONObject replacementMap) replace Matcher matcher = REPLACE_PATTERN.matcher(str); StringBuilder builder = new StringBuilder(); int i = 0; while (matcher.find()) { Object replacement = replacementMap.opt(matcher.group(2)); builder.append(str.substring(i, matcher.start() == 0 ? 0 : matcher.start() + 1)); builder.append(replacement != null ? replacement : ""); ... |