Now I need to generate a java bean according to the next json format,
but the json format maybe changed.
i.e.two json format, one's length is 2,and the other one is3,
maybe need to add one for length 4 in future.so how to solve it?
The first json format:
{"one"="1","two"="2"}
for
{"one"="1","two"="2"}
I need to get a java bean :
public class JsonModel {
private String one;
private String two;
public String getOne() {
return one;
}
public void setOne(String one) {
this.one = one;
}
public String getTwo() {
return two;
}
public void setTwo(String two) {
this.two = two;
}
}
The second json format:
{"one"="1","two"="2","three"="3"}
for
{"one"="1","two"="2","three"="3"}
I need to get a java bean :
public class JsonModel {
private String one;
private String two;
private String three;
public String getOne() {
return one;
}
public void setOne(String one) {
this.one = one;
}
public String getTwo() {
return two;
}
public void setTwo(String two) {
this.two = two;
}
public String getThree() {
return three;
}
public void setThree(String three) {
this.three = three;
}
}