Common causes
The same name twice
Two columns called id would become two keys called id in one object.
Input
id,id 1,2
CSV JSON says
Column name "id" appears twice, in columns 1 and 2 of row 1. JSON objects need unique keys; rename one, or use the arrays output
A trailing delimiter in the header
A comma at the end of the first row adds a column with no name.
Input
id,name, 1,Ann,
CSV JSON says
Column 3 has no name in row 1. JSON objects need a key for every column; name it, or use the arrays output
An unnamed index column
Some tools export a row number column with an empty header. It needs a name before it can be a key.
Input
,name 0,Ann
CSV JSON says
Column 1 has no name in row 1. JSON objects need a key for every column; name it, or use the arrays output
The arrays output
Arrays have no keys, so repeated and empty header names are not a problem. The header row stays as the first array.
Input
id,id 1,2
CSV JSON says
[["id","id"],[1,2]]
How to fix it
- Rename the repeated column in the first row, for example id and id_2.
- Name the empty column, or delete it together with its values.
- Remove a trailing delimiter from every row, header included.
- Switch the converter to the Arrays output, or turn Header row off, if you need every column as it is.