cidgoh / DataHarmonizer

A standardized browser-based spreadsheet editor and validator that can be run offline and locally, and which includes templates for SARS-CoV-2 and Monkeypox sampling data. This project, created by the Centre for Infectious Disease Genomics and One Health (CIDGOH), at Simon Fraser University, is now an open-source collaboration with contributions from the National Microbiome Data Collaborative (NMDC), the LinkML development team, and others.
MIT License
92 stars 25 forks source link

save/export to JSON #209

Closed turbomam closed 2 years ago

turbomam commented 3 years ago

Has there been any discussion about saving to or exporting to formats other than rectangular tables?

Maybe this is a far fetched stretch for a project based on Handsontable. I did find this: https://forum.handsontable.com/t/export-to-json/3925

ddooley commented 3 years ago

Yes, that was brought up as a feature some could probably use. Is that a need of yours? And is it export of raw data as your link mentions that is needed? One thing to say is that we would want to do the JSON-LD export, which would include namespace of ontologies involved in selection lists.

turbomam commented 3 years ago

Yes, NMDC is pretty JSON oriented. Bill, I and others obviously already have to do some table to JSON conversion, but coupling it to the DataHarmonizer template would be great.

I don't see why JSON-LD would be a problem.

dehays commented 3 years ago

I think the area where JSON would be useful is in API communication (persistence, validation) @turbomam moving from Handsontable data structure to JSON for API calls is not too bad. (This is exactly what I did with JGI's sample metadata submission.).

The use case I'd be looking at: Given CRUD API endpoints exists - can the format of those request messages be configured in a some generalized way - perhaps also driven by the data.tsv, either extending data.js (currently HOT config specific) or adding another API specific data structure.

Not sure there is a use case to just export JSON on the client side as files.

ddooley commented 2 years ago

A request from NML has come in for JSON export format so this is more of a priority for us. We will implement this on the LinkML version of DH.

ddooley commented 2 years ago

On pull request https://github.com/cidgoh/DataHarmonizer/pull/344 there is now a save-as-json option.
This doesn't have load-as-json yet though.

ddooley commented 2 years ago

Now save and load are in master!