- 注册时间
- 2012-7-22
- 最后登录
- 2016-6-21
- 阅读权限
- 10
- 积分
- 105
- 精华
- 0
- 帖子
- 24
|
你好,在实际应用数据中,发现有些层级是可以正常解析的,有些却不行,不知是何原因。
tree1.txt与tree2.txt格式完全一样,只是pid不同。
测试数据附件:
tree1.txt:数据可正常解析
- [
- {
- "leve": "comp",
- "id": "2552E7BF-224E-4608-8EE2-816D0B0FAB3A",
- "pid": "01A1AD7C-27E2-48DC-A257-B82F9D07D3C3",
- "caption": "三分公司",
- "code": "1852600300",
- "OrderID": 109,
- "compid": "2552E7BF-224E-4608-8EE2-816D0B0FAB3A",
- "groupid": "01A1AD7C-27E2-48DC-A257-B82F9D07D3C3"
- },
- {
- "leve": "dept",
- "id": "fe40f3dd-1dcc-47e6-9897-8e7048d93f29",
- "pid": "2552E7BF-224E-4608-8EE2-816D0B0FAB3A",
- "caption": "基层领导",
- "code": "3000",
- "OrderID": 10001,
- "compid": "2552E7BF-224E-4608-8EE2-816D0B0FAB3A",
- "groupid": "01A1AD7C-27E2-48DC-A257-B82F9D07D3C3"
- },
- {
- "leve": "dept",
- "id": "29a1b792-ca7d-44cb-aaf0-451b11e88b6f",
- "pid": "2552E7BF-224E-4608-8EE2-816D0B0FAB3A",
- "caption": "综合办公室",
- "code": "320A",
- "OrderID": 10002,
- "compid": "2552E7BF-224E-4608-8EE2-816D0B0FAB3A",
- "groupid": "01A1AD7C-27E2-48DC-A257-B82F9D07D3C3"
- }
- ]
复制代码
tree2.txt:无法解析层级
- [
- {
- "leve": "comp",
- "id": "31413139-14e7-4f74-9b75-8996bfbd956b",
- "pid": "01A1AD7C-27E2-48DC-A257-B82F9D07D3C3",
- "caption": "三分公司",
- "code": "1852600300",
- "OrderID": 109,
- "compid": "31413139-14E7-4F74-9B75-8996BFBD956B",
- "groupid": "01A1AD7C-27E2-48DC-A257-B82F9D07D3C3"
- },
- {
- "leve": "dept",
- "id": "fe40f3dd-1dcc-47e6-9897-8e7048d93f29",
- "pid": "31413139-14E7-4F74-9B75-8996BFBD956B",
- "caption": "基层领导",
- "code": "3000",
- "OrderID": 10001,
- "compid": "31413139-14E7-4F74-9B75-8996BFBD956B",
- "groupid": "01A1AD7C-27E2-48DC-A257-B82F9D07D3C3"
- },
- {
- "leve": "dept",
- "id": "29a1b792-ca7d-44cb-aaf0-451b11e88b6f",
- "pid": "31413139-14E7-4F74-9B75-8996BFBD956B",
- "caption": "综合办公室",
- "code": "320A",
- "OrderID": 10002,
- "compid": "31413139-14E7-4F74-9B75-8996BFBD956B",
- "groupid": "01A1AD7C-27E2-48DC-A257-B82F9D07D3C3"
- }
- ]
复制代码
|
|