Skip to content

dstull/csv2json

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

csv2json

Go Report Card Go Doc Release CircleCI

Simple tool for converting CSVs to JSON

Installation

First install Go.

GOBIN=$(pwd) GOPATH=$(mktemp -d) go get github.com/dstull/csv2json
go build

Usage

./csv2json -h
Usage of csv2json:
  -i string
    	Input file (default: stdin)
  -o string
    	Output file (default: stdout)

$ more test.csv
first,second,third,fourth
a,b,c,d
e,f,g,h

$ ./csv2json -i=test.csv| jsonpp
{
  "columns": [
    "first",
    "second",
    "third",
    "fourth"
  ],
  "lines": [
    [
      "a",
      "b",
      "c",
      "d"
    ],
    [
      "e",
      "f",
      "g",
      "h"
    ]
  ]
}

About

Simple tool for converting CSVs to JSON

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%