From c1c020a8b9324a8b69b9328ece354a9a7d042ce9 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 21 十月 2022 09:55:30 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/common/web/BaseController.java |   15 +++++++++++++++
 1 files changed, 15 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..b4678bf 100644
--- a/src/main/java/com/zy/common/web/BaseController.java
+++ b/src/main/java/com/zy/common/web/BaseController.java
@@ -142,4 +142,19 @@
             wrapper.like(columns.get(i), condition);
         }
     }
+
+    public static boolean isJSON(String str) {
+        if (Cools.isEmpty(str)) {
+            return false;
+        } else {
+            str = str.trim();
+            if (str.startsWith("{") && str.endsWith("}")) {
+                return true;
+            } else if (str.startsWith("[") && str.endsWith("]")) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+    }
 }

--
Gitblit v1.9.1