環境:使用阿里Fastjson
public static boolean isJSON(String context){
try{
JSONObject jsonObject=JSONObect.parseObject(context);
return true;
}catch(Excepiton e){
e.printStackTrace();
return false;
}
}
環境:使用阿里Fastjson
public static boolean isJSON(String context){
try{
JSONObject jsonObject=JSONObect.parseObject(context);
return true;
}catch(Excepiton e){
e.printStackTrace();
return false;
}
}