csv2json
csv2json copied to clipboard
A gem useful for converting CSV files to JSON from command-line
Trying to parse a German csv file with Umlauts (ä, ö, ü) and ';' as delimiter (specified by using -s option) in it and got "invalid byte sequence in UTF-8...
When trying to use csv2json, it unfortunately does not work out of the box. It depends on a gem that is not installed by default. This is a very frustrating...
Hey Folks, Running ubuntu 12.04. needed to do the following ``` $sudo apt-get install ruby-dev ``` Then, from the other depency issue listed ``` $sudo gem install orderedhash ``` For...
I tried using csv2json, here is what i get: ``` /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- orderedhash (LoadError) from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /var/lib/gems/1.9.1/gems/csv2json-0.3.0/lib/csv2json.rb:4:in `' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in...
Hi, In my understanding, we can remove the dependency for orderedhash since ruby(>= 1.9) supports ordered hash. Note: this branch was forked from #17
Hi, I wonder that this gem still needs to depend to jeweler? Now bundler has the feature `bundle gem`, so we just use bundler instead. Also I added test-unit and...
``` sudo gem install csv2json -v 0.3.0 csv2json input.csv ``` ``` /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- orderedhash (LoadError) from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from /var/lib/gems/2.1.0/gems/csv2json-0.3.0/lib/csv2json.rb:4:in `' from /usr/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require' from...
This doesn't work although it should according to the documentation: `cat test.csv | csv2json``
Hi, I got an error, any idea? $ json2csv 1.json /usr/lib/ruby/1.8/csv.rb:326:in `initialize': can't convert Hash into String (TypeError) from /usr/lib/ruby/1.8/csv.rb:326:in`open' from /usr/lib/ruby/1.8/csv.rb:326:in `open_writer' from /usr/lib/ruby/1.8/csv.rb:111:in`generate' from /usr/local/bin/../lib/json2csv.rb:15:in `parse' from /usr/local/bin/json2csv:69...