自动化立体仓库 - WMS系统
#
luxiaotao1123
2022-10-19 3989e356b6b8bcd31e2d2981ac78e41f8ebbdfa5
src/main/java/com/zy/common/web/BaseController.java
@@ -1,6 +1,5 @@
package com.zy.common.web;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
@@ -146,14 +145,12 @@
    public static boolean isJSON(String str) {
        if (Cools.isEmpty(str)) {
            return false;
            return true;
        } else {
            try {
                JSON.parse(str);
                return true;
            } catch (Exception e) {
            str = str.trim();
            if (str.startsWith("{") && str.endsWith("}")) {
                return false;
            }
            } else return !str.startsWith("[") || !str.endsWith("]");
        }
    }
}