/**
* 判断字符串是否可以转化为json对象
* @param content
* @return
*/
import net.minidev.json.JSONObject;
import net.minidev.json.JSONValue;
public static boolean isJsonObject(String content) {
// 字符串判空
if(StringUtils.isBlank(content))
return false;
try {
JSONObject jsonStr = (JSONObject) JSONValue.parse(content);
return true;
} catch (Exception e) {
return false;
}
}
07-30
1215
12-02
2513
08-01
1292