Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
require 'csv'
require 'json'
if ARGV.size != 2
puts 'Usage: csv_to_json in out'
puts
puts ' input: Input CSV file'
puts ' out: Output JSON file or -- for stdout'
puts