我正在使用d3.js可视化可折叠树布局中的数据。它与flare.json数据工作正常,但似乎有其他json文件有问题。我的json文件有效。
我得到的错误如下:Uncaught TypeError:无法读取未定义的属性'children'我的json是here
{
"name":"dummy",
"children":
[
{
"date": "20040309",
"name": "US",
"id": "27",
"kind": "S1",
"application_type": "not found",
"children": [
{"length": 27,
"type": "US",
"id": "28",
"kind": "S",
"name": "Mewdows",
"date": "19730700",
"main_classification": "D 2907"
},
{"length": 27,
"type": "US",
"id": "29",
"kind": "S",
"name": "Askew",
"date": "19731100",
"main_classification": "D 2907"
},
{"length": 27,
"type": "US",
"id": "30",
"kind": "S",
"name": "Adams",
"date": "20020500",
"main_classification": "D 2969"
},
{"length": 27,
"type": "US",
"id": "31",
"kind": "S",
"name": "Adams et al.",
"date": "20020500",
"main_classification": "D 2969"
},
{"length": 27,
"type": "US",
"id": "32",
"kind": "S",
"name": "Adams",
"date": "20020800",
"main_classification": "D 2969"
},
{"length": 27,
"type": "US",
"id": "33",
"kind": "S",
"name": "Adams",
"date": "20030700",
"main_classification": "D 2969"
},
{"length": 27,
"type": "US",
"id": "34",
"kind": "S",
"name": "Robbins",
"date": "20031000",
"main_classification": "D 2969"
}
],
"classification_national": "D 2969",
"length": 7
},
{
"date": "20040309",
"name": "US",
"id": "30997425",
"kind": "S1",
"application_type": "not found",
"children": [
{"length": 7,
"type": "US",
"id": "35",
"kind": "A",
"name": "Alba et al.",
"date": "19851000",
"main_classification": "323308"
},
{"length": 7,
"type": "US",
"id": "36",
"kind": "A",
"name": "Dobberstein",
"date": "19851000",
"main_classification": "323308"
}
],
"classification_national": "D13110",
"length": 2
},
{
"date": "20040309",
"name": "US",
"id": "56992283",
"kind": "B2",
"application_type": "not found",
"children": [
{ "length": 114,
"type": "US",
"id": "151",
"kind": "A",
"name": "Demetre",
"date": "19770300",
"main_classification": "271183"
},
{"length": 114,
"type": "US",
"id": "152",
"kind": "A",
"name": "Carstedt",
"date": "19771100",
"main_classification": "271183"
},
{"length": 114,
"type": "US",
"id": "153",
"kind": "B1",
"name": "Teumer et al.",
"date": "20010100",
"main_classification": "271194"
},
{"length": 114,
"type": "DE",
"id": "154",
"kind": "not found",
"name": "not found",
"date": "19751200",
"main_classification": "not found"
},
{"length": 114,
"type": "DE",
"id": "155",
"kind": "not found",
"name": "not found",
"date": "19770100",
"main_classification": "not found"
},
{"length": 114,
"type": "DE",
"id": "156",
"kind": "not found",
"name": "not found",
"date": "19800300",
"main_classification": "not found"
}
],
"classification_national": "271276",
"length": 6
}
]
}
任何帮助将不胜感激。