thoughtbot / art_vandelay

Art Vandelay is an importer/exporter for Rails 6.0 and higher.
MIT License
73 stars 4 forks source link

Would`art_vandelay` accept pull requests for a JSON adapter? #26

Open benjaminwil opened 3 months ago

benjaminwil commented 3 months ago

Hi. Thanks for publishing this gem 🙏

Currently this gem supports importing and exporting CSVs. If I were to implement a JSON adapter would you consider a pull request (or: pull requests) for this feature?

stevepolitodesign commented 2 months ago

This is a good question!

I worry that if we support a JSON adapter, we'll need to support other formats. Could you provide a use-case for the need to support importing and exporting as JSON?

benjaminwil commented 2 months ago

Sure. My use case is that users of my application have JSON exports of their data from another application, and I want to import that data into my application.

There isn't really a compelling reason to export to JSON, except that some users and developers may appreciate exports in JSON format more than they would CSV format.

I worry that if we support a JSON adapter, we'll need to support other formats.

That's a reasonable worry! I think the text in the README inspired me and let me see the potential of a general purpose Rails importer-exporter utility. Based on the kinds of exports and imports I've been asked to do in the past, I would love something like Art Vandelay to have adapters for JSON, MySQL, Google Sheets, XML documents, and so on.

If that was never the purpose or goal of this gem, I completely understand and will close this issue.

stevepolitodesign commented 2 months ago

I think a JSON adapter would be a nice addition, especially since it's already part of Ruby's Standard Library. Maybe that's the metric on which we determine if other adapters should be added or not. But for now, I say go for it 👍