📄 ajaxmessagesjson.java
字号:
package com.laoer.bbscs.web.ajax;
import org.json.*;
import org.apache.commons.logging.*;
public class AjaxMessagesJson {
private static final Log logger = LogFactory.getLog(AjaxMessagesJson.class);
private JSONObject json = new JSONObject();
public void setMessage(String codeid, String message) {
try {
this.json.put("codeid", codeid);
this.json.put("message", message);
this.json.put("text", "");
} catch (JSONException e) {
logger.error(e);
}
}
public void setMessage(String codeid, String message, String text) {
try {
this.json.put("codeid", codeid);
this.json.put("message", message);
this.json.put("text", text);
} catch (JSONException e) {
logger.error(e);
}
}
public String getJsonString() {
return this.json.toString();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -