从fastjson 1.2.32版本开始,xml转对象后(转换成功),再转Json (JSON.toJSONString)报错:
fieldinfo空指针错误
XML:
treetable/controller.xml
treetable/service.xml
treetable/dao.xml
treetable/entity.xml
treetable/mapper.xml
treetable/viewForm.xml
treetable/viewList.xml
class1: GenConfig
/
import java.io.Serializable;
import java.util.List;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;
import com.treps.modules.sys.entity.Dict;
@XmlRootElement(name="config")
public class GenConfig implements Serializable {
private static final long serialVersionUID = 1L;
private List categoryList;// 代码模板分类
private List javaTypeList;// Java类型
private List queryTypeList;// 查询类型
private List showTypeList;// 显示类型
public GenConfig() {
super();
}
@XmlElementWrapper(name = "category")
@XmlElement(name = "category")
public List getCategoryList() {
return categoryList;
}
public void setCategoryList(List categoryList) {
this.categoryList = categoryList;
}
@XmlElementWrapper(name = "javaType")
@XmlElement(name = "dict")
public List getJavaTypeList() {
return javaTypeList;
}
public void setJavaTypeList(List javaTypeList) {
this.javaTypeList = javaTypeList;
}
@XmlElementWrapper(name = "queryType")
@XmlElement(name = "dict")
public List getQueryTypeList() {
return queryTypeList;
}
public void setQueryTypeList(List queryTypeList) {
this.queryTypeList = queryTypeList;
}
@XmlElementWrapper(name = "showType")
@XmlElement(name = "dict")
public List getShowTypeList() {
return showTypeList;
}
public void setShowTypeList(List showTypeList) {
this.showTypeList = showTypeList;
}
}
/