From 3989e356b6b8bcd31e2d2981ac78e41f8ebbdfa5 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 19 十月 2022 10:02:31 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/web/BaseController.java | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/zy/common/web/BaseController.java b/src/main/java/com/zy/common/web/BaseController.java
index 60d9fc1..c0455b4 100644
--- a/src/main/java/com/zy/common/web/BaseController.java
+++ b/src/main/java/com/zy/common/web/BaseController.java
@@ -142,4 +142,15 @@
wrapper.like(columns.get(i), condition);
}
}
+
+ public static boolean isJSON(String str) {
+ if (Cools.isEmpty(str)) {
+ return true;
+ } else {
+ str = str.trim();
+ if (str.startsWith("{") && str.endsWith("}")) {
+ return false;
+ } else return !str.startsWith("[") || !str.endsWith("]");
+ }
+ }
}
--
Gitblit v1.9.1