日期:2014-05-20 浏览次数:20681 次
String text = {"base_resp":{"ret":10702,"err_msg":"can not send this type of msg"}}
JSON.parseObject(text, MsgJson.class)
public class MsgJson {
BaseResp base_resp = new BaseResp();
class BaseResp {
private int ret;
private String err_msg;
public int getRet() {
return ret;
}
public void setRet(int ret) {
this.ret = ret;
}
public String getMsg() {
return err_msg;
}
public void setMsg(String err_msg) {
this.err_msg = err_msg;
}
}
}