寻找可扩展的表格视图来转换我的 JSON 树结构

Looking for expandable tableview to convert my JSON tree structure

我想将下面的 JSON 树结构转换为可展开的表格视图。 JSON 树可以从服务器动态更改,它可以包含最多多个内部级别的子节点。

{
  "Tree": {
    "node": [
      {
        "node": [
          {
            "node": null
          },
          {
    
            "node": [
              {
                "node": null
              }
            ]
          }
        ]
      },
      {
        "node": [
          {
            "node": null
          },
          {
            "node": null
          },
          {
            "node": null
          }
        ]
      }
    ]
  }
}

如果您想在 UITableview 中使用 JSON 创建 dynamic tree 结构,我推荐 KJExpandableTableTree 库。

  • 它还提供静态初始化。