Skip to content

cescue/json-to-csv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

json_converter

A small ruby class to convert JSON into a tabular, comma-separated format.

Installation

gem install json_converter

Usage

The JsonConverter class is able to convert objects created with JSON.parse, as well as raw JSON strings.

require 'json_converter'
converter = JsonConverter.new

json = some_valid_json_object_or_string

csv = converter.generate_csv(json)               # Generate a CSV string...
converter.write_to_csv(json, 'boiled_frogs.csv') # ... or write your CSV to a file

Inspired by http://konklone.io/json/.

TODO

  • Write tests
  • Repackage gem with a more descriptive name

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages