Open benjaminwil opened 3 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?
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.
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 👍
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?