接收前臺返回的Json格式引數
阿新 • • 發佈:2019-02-08
public void add(HttpServletRequest request){
String content = this.getRequestContent(request);
if(StringUtils.isBlank(content)){
...
}
JSONObject obj =null;
try {
obj = JSONObject.fromObject(content);
} catch (Exception e) {
e.printStackTrace();
Log.info("引數格式有誤" );
}
String font = JsonUtils.getJsonString(obj, "font","");
int maxFont = JsonUtils.getJsonRealInt(obj, "maxFont", 0);
}