用这个建实体类:{ "ret": 0, "msg": "打印成功", "data": "UA", "success": true }
时间: 2023-08-31 20:08:38 浏览: 74
下面是一个可能的实体类的示例代码:
```java
public class Response {
private int ret;
private String msg;
private String data;
private boolean success;
public int getRet() {
return ret;
}
public void setRet(int ret) {
this.ret = ret;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public boolean isSuccess() {
return success;
}
public void setSuccess(boolean success) {
this.success = success;
}
}
```
这个实体类对应的 JSON 数据如下:
```json
{
"ret": 0,
"msg": "打印成功",
"data": "UA",
"success": true
}
```
你可以根据实际需要修改实体类的属性名称和类型。
阅读全文