|
@@ -11,6 +11,11 @@ public class JsonUtils {
|
|
|
private static final Pattern NESTED_JSON_PATTERN =
|
|
private static final Pattern NESTED_JSON_PATTERN =
|
|
|
Pattern.compile("\"(\\w+)\":\"(\\{.*?\\})\"");
|
|
Pattern.compile("\"(\\w+)\":\"(\\{.*?\\})\"");
|
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
|
+ * 处理json字符串包含json对象
|
|
|
|
|
+ * @param jsonStr
|
|
|
|
|
+ * @return
|
|
|
|
|
+ */
|
|
|
public static String fixNestedJson(String jsonStr) {
|
|
public static String fixNestedJson(String jsonStr) {
|
|
|
// 处理嵌套JSON结构
|
|
// 处理嵌套JSON结构
|
|
|
Matcher matcher = NESTED_JSON_PATTERN.matcher(jsonStr);
|
|
Matcher matcher = NESTED_JSON_PATTERN.matcher(jsonStr);
|