public static boolean isJSON(String context){try{JSONObject jsonObject=JSONObect.parseObject(context);return true;}catch(Excepiton e){e.printStackTrace();return false;}
}
java判断string字符串是不是json格式
原文:https://blog.51cto.com/1929297/2582927