Skip to content

Transform CSVs to JSON lines, from files or streams.

Notifications You must be signed in to change notification settings

Abrimos-info/csv2json

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv2json

Transform CSVs to JSON lines, from files or streams.

Installation

  • git clone
  • npm install

Execution

From file

Read CSV data from a file and stream out transformed data as JSON lines.

node index.js -f data.csv > data.jsonl

Command line parameters:

--file -f String Path to file containing CSV data

From stream

Stream CSV data from stdin and stream out transformed data as JSON lines.

cat data.csv | node index.js [--id hash] > data.jsonl

Command line parameters:

--id -i Whether to generate an ID for each object. Accepted values: hash (generates a hash from the converted JSON object).

About

Transform CSVs to JSON lines, from files or streams.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published