A simple command line for convert CSV in JSON

Related tags

Command Line c2j
Overview

C2J

Go Go Report Card codecov

A simple command line for convert CSV in JSON list of objects based on header.

Install

With Go 1.17 or higher:

go install github.com/edermanoel94/c2j

Usage

Convert

To convert, run the c2j command to read from STDIN, using standard delimiter, which is comma.

$ cat example_comma.csv | c2j

Convert with custom delimiter

Use the --delimiter or short version-d flag to specify a delimiter.

$ cat example_semicolon.csv | c2j --delimiter ";"

Demo

Demonstration

Todo

  • Convert without header and generate keys based on index (WIP)
  • Use a path to file argument for convert
  • Save output to a file
  • Benchmark

Contributing

Pull requests for new features, bug fixes, and suggestions are welcome!

License

MIT

Live

I use Twitch to stream, follow me, to see new features on this project.

You might also like...
A command line tool that builds and (re)starts your web application everytime you save a Go or template fileA command line tool that builds and (re)starts your web application everytime you save a Go or template file

# Fresh Fresh is a command line tool that builds and (re)starts your web application everytime you save a Go or template file. If the web framework yo

A command line tool to prompt for a value to be included in another command line.

readval is a command line tool which is designed for one specific purpose—to prompt for a value to be included in another command line. readval prints

Xopopu - Export csv to json for web preview

xopopu Diagram English Document La idea es crear una herramienta de backend que

Package command provide simple API to create modern command-line interface

Package command Package command provide simple API to create modern command-line interface, mainly for lightweight usage, inspired by cobra Usage pack

Watcher - A simple command line app to watch files in a directory for changes and run a command when files change!

Watcher - Develop your programs easily Watcher watches all the files present in the directory it is run from of the directory that is specified while

🔄 A command-line utility to export Protocol Buffers (proto) files to YAML, and JSON

proto2yaml 🔄 A command-line utility to export Protocol Buffers (proto) files to YAML, and JSON. Currently supported exports are for: Packages Service

Command-line JSON processor

jq jq is a lightweight and flexible command-line JSON processor. , Unix: , Windows: If you want to learn to use jq, read the documentation at https://

rj is a command line tool show the HTTP Response as JSON
rj is a command line tool show the HTTP Response as JSON

rj rj is a command line tool show the HTTP Response as JSON Installation

Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.

asciigraph Go package to make lightweight ASCII line graphs ╭┈╯. Installation go get github.com/guptarohit/asciigraph Usage Basic graph package main

Owner
Eder Costa
Software Engineer, like to work with concurrency, web crawlers and network tools.
Eder Costa
A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

A simple command line functionality to convert your Kaspersky Password Manager exported file to CSV format

Vlad Plaiasu 7 Apr 20, 2022
Simple tool to convert a Parquet file to a CSV written in Go/ Golang

Parquet2CSV Parquet2CSV is a simple tool to convert a Parquet file to a CSV written in Go/ Golang Usage: parquet2csv <PATH_TO_PARQUET_FILE> This will

null 2 Nov 3, 2022
Smart and simple CSV processing on the command line

csvquote smart and simple CSV processing on the command line Are you looking for a way to process CSV data with standard UNIX shell commands? Are you

Adam Gordon Bell 22 Nov 16, 2022
Program to convert plain text to CSV file which can imported into Anki.

Program to convert plain text to CSV file which can imported into Anki. The motivation of this program is to save time by automatically coverting Question and Answer into CSV file which can be imported directly into Anki.

Anuroop Sirothia 0 May 22, 2022
Json-match - Command line util for matching values in a JSON input

json-match Match JSON input by specifying key and value > json-match -json '{\"p

Trond Boksasp 0 Jan 12, 2022
Command-line tool to load csv and excel (xlsx) files and run sql commands

csv-sql supports loading and saving results as CSV and XLSX files with data processing with SQLite compatible sql commands including joins.

Dhamith Hewamullage 24 Nov 2, 2022
Command line tool for processing client transaction data in CSV format

command line tool for processing client transaction data in CSV format. thank you for looking! build instructions: $ git clone https://github.com/lnit

Luke Nittmann 0 Oct 29, 2021
From the command line, quickly explore data from a CSV file.

shallow-explore From the command line, quickly explore data from a CSV file. shallow-explore is a Golang backed command-line tool for iterating over c

Thomas Mickley-Doyle 30 Nov 10, 2022
Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.)

go2struct-tool Use the command to convert arbitrary formats to Go Struct (including json, toml, yaml, etc.) Installation Run the following command und

Afeyer 1 Dec 16, 2021
An open-source GitLab command line tool bringing GitLab's cool features to your command line

GLab is an open source GitLab CLI tool bringing GitLab to your terminal next to where you are already working with git and your code without switching

Clement Sam 2.1k Nov 22, 2022