janisdd / vscode-edit-csv

vs code extension to edit csv files with an excel like table ui
MIT License
226 stars 35 forks source link

Export as JSON? #171

Open Gaojianli opened 4 weeks ago

Gaojianli commented 4 weeks ago

Version?

Feature

Firstly, thanks for making such awseome plugin! Editing csv as table really simplified my work. However, I don't find a way to export the header-csv as json, could you please add one?

janisdd commented 3 weeks ago

Hi, what do you mean by header-csv? Do you want to export the csv/table as json?

janisdd commented 4 days ago

@Gaojianli Can you explain this in more detail?

Gaojianli commented 4 days ago

example csv:

name,age
tom,16

Export as JSON:


[
  {
     "name":"tom"
     "age": 16
   }
]
janisdd commented 4 days ago

This is not as easy as it seems... JSON has different data types and the plugin treats all cells as strings (with the exception of auto-fill and statistics).

So, I can get you

name,age
tom,16
[
  {
     "name":"tom"
     "age": "16"
   }
]

if this helps.