1、首先是Java巳呀屋饔,resJsonObj = {}1.判断data是否为空JSONObject dataJson =resJsonObj.getJSONObject("data");//下边判断是否为NULL!!!if(dataJson == null || dataJson.isEmpty() || dataJson.isNullObject() || "null".equals(dataJson)){ return "error";}
2、JS:varresJson={data:"&孥恶膈茯quot;};if(resJson&&resJson.data岿滗欣橡!=""){alert("resJson不为空")}else{alert("resJson为空")}
3、jQuery:jQuery.isEmptyObject(obj)