public class JavaBeanTest {
private int anInt;
private State state;
private String string;
private JavaBean2 javaBean2;
}
public class JavaBean2 {
private int anInt;
private State state;
private String string;
}
测试JSON.toJSON(javaBeanTest, new SerializeConfig(true))
结果:{"string":"hello json","anInt":15,"state":"LOGIN","javaBean2":{}}
1条答案
按热度按时间mxg2im7a1#
getter,setter方法???