Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert table to JSON #11

Open
pjotrp opened this issue Jul 27, 2012 · 3 comments
Open

Convert table to JSON #11

pjotrp opened this issue Jul 27, 2012 · 3 comments

Comments

@pjotrp
Copy link
Owner

pjotrp commented Jul 27, 2012

No description provided.

@vpereira
Copy link

vpereira commented Mar 1, 2013

not so easy if you want to do row based as you are doing with the other formatters. maybe a initial step would be a .to_h method to the Table class?

@pjotrp
Copy link
Owner Author

pjotrp commented Mar 1, 2013

That is an idea.

Check out the RDF outputter. The JSON one should be similar.

@vpereira
Copy link

vpereira commented Mar 1, 2013

please check my git pull. I added a to_h method to the Table class. now it is possible to do something like:

require './lib/bio-table'
include BioTable
x = TableReader::read_file("./test/data/input/table1.csv")
x.to_h

after that you could do something like x.to_h.to_json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants