接收前台返回的Json格式参数

来源:互联网 发布:新唐单片机官网 编辑:程序博客网 时间:2024/05/04 04:17
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);              }
0 0
原创粉丝点击