1.代码如下
result.put("success", true);
result.put("date", cardF);
ServletActionContext.getResponse().setContentType("text/html;charset=utf-8");
ServletActionContext.getResponse().getWriter().print(JSONObject.fromObject(cardF));
需要的包是:
JSONObject() 直接进行搜索就好了。