怎么封装JSON数据

吉光片羽幻成仙 吉光片羽幻成仙 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
这个是JSON数据
{"demo_node_1":{"name":"矫正人员","left":526,"top":0,"type":"start round","width":24,"height":24,"alt":true},"demo_node_2":{"name":"提交申请","left":492,"top":62,"type":"state","width":100,"height":24,"alt":true},"demo_node_3":{"name":"管理员审批","left":492,"top":127,"type":"fork","width":100,"height":24,"alt":true},"demo_node_4":{"name":"同意申请","left":727,"top":126,"type":"node","width":100,"height":24,"alt":true},"demo_node_5":{"name":"拒绝申请","left":280,"top":130,"type":"node","width":100,"height":24,"alt":true},"demo_node_6":{"name":"上报申请","left":494,"top":205,"type":"state","width":100,"height":31,"alt":true},"demo_node_7":{"name":"同意申请","left":372,"top":321,"type":"node","width":100,"height":24,"alt":true},"demo_node_8":{"name":"拒绝申请","left":633,"top":316,"type":"state","width":100,"height":24,"alt":true}},


这个是对象
package gdzly.entity;

public class Noode {
private Integer id;
private String title;
private String name;
private Integer prantnodeId;
private Integer left;
private Integer top;
private String type;
private Integer width;
private Integer height;
private String alt;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getPrantnodeId() {
return prantnodeId;
}
public void setPrantnodeId(Integer prantnodeId) {
this.prantnodeId = prantnodeId;
}
public Integer getLeft() {
return left;
}
public void setLeft(Integer left) {
this.left = left;
}
public Integer getTop() {
return top;
}
public void setTop(Integer top) {
this.top = top;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Integer getWidth() {
return width;
}
public void setWidth(Integer width) {
this.width = width;
}
public Integer getHeight() {
return height;
}
public void setHeight(Integer height) {
this.height = height;
}
public String getAlt() {
return alt;
}
public void setAlt(String alt) {
this.alt = alt;
}
public Noode(Integer id, String title, String name, Integer prantnodeId,
Integer left, Integer top, String type, Integer width,
Integer height, String alt) {
super();
this.id = id;
this.title = title;
this.name = name;
this.prantnodeId = prantnodeId;
this.left = left;
this.top = top;
this.type = type;
this.width = width;
this.height = height;
this.alt = alt;
}
public Noode() {
super();
// TODO Auto-generated constructor stub
}




}

怎么封进去,求大神解决
...全文
评论 15
收藏 已收藏
分享
返回顶部
吉光片羽幻成仙
Java EE 67,535 成员 225,843 内容