javascript - Is there a fixed format for json for using it in collapsible tree layout? -
i using d3.js visualizing data in collapsible tree layout.its working fine flare.json data seems have problems other json files work.my json file valid.
the error getting follows uncaught typeerror: cannot read property 'children' of undefined , 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 } ] }
any appreciated.
Comments
Post a Comment