public class LibraryGdsFaxingCatgDTO {
/**
* 层级展示
*/
private String hierarchy;
/**
* 发行分类总数据
*/
private List<LibraryDataDTO> dataList;
public String getHierarchy() {
return hierarchy;
}
public void setHierarchy(String hierarchy) {
this.hierarchy = hierarchy;
}
public List<LibraryDataDTO> getDataList() {
return dataList;
}
public void setDataList(List<LibraryDataDTO> dataList) {
this.dataList = dataList;
}
public class LibraryDataDTO {
/**
* 首页分类名称
*/
private String name;
/**
* 分类编码
*/
private String code;
/**
* 是否展示
*/
private String isShow;
/**
* 递归子类
*/
private List<LibraryDataDTO> childrenList;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getIsShow() {
return isShow;
}
public void setIsShow(String isShow) {
this.isShow = isShow;
}
public List<LibraryDataDTO> getChildrenList() {
return childrenList;
}
public void setChildrenList(List<LibraryDataDTO> childrenList) {
this.childrenList = childrenList;
}
String data = {"hierarchy":"4","data":[{"name":"教材","code":"4009,4011,4012","isShow":"1","children":[{"name":"配套教材","code":"4009","children":[],"isShow":"0"},{"name":"学历教育教材","code":"4011","children":[],"isShow":"0"},{"name":"培训教材","code":"4012","children":[],"isShow":"0"}]},{"name":"参考书","code":"4006","isShow":"1","children":[{"name":"参考书","code":"4006","children":[],"isShow":"0"}]},{"name":"科普书","code":"4006","isShow":"1","children":[{"name":"科普","code":"4017","children":[],"isShow":"0"}]},{"name":"考试用书","code":"4006","isShow":"1","children":[{"name":"考试用书","code":"4010","children":[],"isShow":"0"}]}]}
这个字符串递归解析最终结果为 LibraryGdsFaxingCatgDTO怎么实现?帮忙看一下