java递归树结构.rar

时间:2024-07-13 04:08:42
【文件属性】:

文件名称:java递归树结构.rar

文件大小:1KB

文件格式:RAR

更新时间:2024-07-13 04:08:42

jdk1.8 java

java 生成树结构的数据格式返回给前端。。这是demo最后生成的数据格式:[{"id":1,"name":"名字1","parentId":0,"children":[{"id":3,"name":"名字3","parentId":1,"children":[{"id":7,"name":"名字7","parentId":3,"children":[]},{"id":8,"name":"名字8","parentId":3,"children":[]}]},{"id":4,"name":"名字4","parentId":1,"children":[]}]},{"id":2,"name":"名字2","parentId":0,"children":[{"id":5,"name":"名字5","parentId":2,"children":[]},{"id":6,"name":"名字6","parentId":2,"children":[]}]}],有需要的小伙伴可以下载看看


【文件预览】:
java递归树结构
----User.java(495B)
----demo.java(3KB)

网友评论