0.0
No commit activity in last 3 years
No release in over 3 years
Use a given JSON and fields names to generate a CSV.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.14
~> 1.16
~> 0.2
~> 0.0
~> 10.0
~> 3.0
~> 0.15

Runtime

~> 0.20.0
 Project Readme

Simplejson2csv

This command-line-tool was designed to EASILY convert JSON to CSV. You can set which fields (keys) you want to output! You can choose which separator you want!

Purpose: I did a grep in a bunch of log files with different JSON's formats. So I needed to parse then and choose just a few fields that were relevant. I wrote a simple ruby file to do this job and I thought: "Hmm, why would I publish this on RubyGems?... A: Why not?"

Installation

Just install it:

$ gem install simplejson2csv

Usage

Help:

$ simplejson2csv help convert

Convert:

$ simplejson2csv convert --json=tmp/sample.json --csv=tmp/sample-output.csv
--fields="foo bar" --separator="|"

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/walbinjr/simplejson2csv.