Skip to content
 
 

Latest commit

 

History

17 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages