csv2json

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2018 License: MIT Imports: 3 Imported by: 0

README

csv2json

Go Report Card Go Doc Release

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"
    ]
  ]
}

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL