score:2

Accepted answer

json data is typed; that is, the file format distinguishes between string and numerical data. csv data is untyped: all entries are expressed as strings.

the chart specification above requires some fields to be numerical. when you convert the input data to csv, you must add a format specifier to specify numerical types for the numerical data columns.

in case of this chart you can use the following for the nodes data:

"format": {
  "type": "tsv",
  "parse": { "id": "number", "name": "string", "parent": "number" }
},

and the following for the links data:

"format": {
  "type": "tsv",
  "parse": { "source": "number", "target": "number" }
},

Related Query