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

Have you considered json schema? #6

Closed
albertoabellagarcia opened this issue Jan 23, 2023 · 5 comments
Closed

Have you considered json schema? #6

albertoabellagarcia opened this issue Jan 23, 2023 · 5 comments

Comments

@albertoabellagarcia
Copy link

It looks to me that
https://github.com/openrepair/data/blob/master/quests/printers/tableschema.json

is doing what is already available using json schema format,

What is the reason to 'create tableschema.json this way and not directly into json schema?

Thanks

@zenlan
Copy link
Contributor

zenlan commented Jan 23, 2023

The tableschema file came from the concept by Frictionless Data some time ago. This file is merely a way to communicate the CSV data structure, data types and metadata relating to the dataset.

The regular export of the Open Repair data is scripted and outputs datasets in both CSV and JSON formats, along with "tableschema" and README files. Quest data is infrequent, the exports are not scripted and nobody has ever asked for it in JSON format. Can't see a reason to not provide JSON, will put the idea in our backlog and see what the team thinks. It will no doubt depend on time and budget.

@albertoabellagarcia
Copy link
Author

I like you mention frictionless data because we already mapped frictionless data and if I am not wrong they have already json schemas. We adapted them at the smart data models with their agreement. You can see here https://github.com/smart-data-models/dataModel.FrictionlessData.

We held a call with some colleagues of open repair and we would be ready to help with the creation of these json schemas as long as there would be some use case in JSON. If there is only CSV we could consider it as well.

After that, we create also export the examples in CSV, JSON, JSON-LD and for the structure, we export in YAML, SQL, and depending on the model DTDL and geojson features.
Additionally, we translate the definitions to be available not only in English but also in FR, DE, SP, JP, IT, and ZH (Chinese).

@ngm
Copy link
Contributor

ngm commented Feb 15, 2023

Hi Alberto, thanks for the interest! Could you elaborate further what benefits / use cases JSON schema might support? If there is a compelling use case for providing JSON schema in addition to / instead of tableschema.json we would happily consider it. But at present as we have limited resources we couldn't commit to that long-term without a clear reason to do so.

@albertoabellagarcia
Copy link
Author

If I were you I would not do a migration because it is good enough for the current utilization on your side.
What advantages of json schema? In my opinion, the most important is that there are many libraries in different programming languages and online services (like this one we use ) that can validate if a payload is compliant and therefore you can provide certainty to the users or they can use their own validators.

At SmartDataModels we have developed scripts that based on the descriptions in a json schema generate

  1. a markdown specification (like these in 7 languages) ,
  2. Populates all the attributes and include them in a database.
  3. Generate a @context
  4. Creates a searchable form for a wordpress site
  5. With a bit more we created a python package with all the json schemas
    and quite a few more..

@ngm
Copy link
Contributor

ngm commented Feb 23, 2023

Thanks @albertoabellagarcia , I appreciate your thoughts on this, and good to know about those potential uses. It sounds like it could be worth exploring when we come to a point of wanting to provide end-users with more options to use the data themselves. As you mention I think for now providing CSV/JSON and allowing people to work with that themselves is good enough, but as demand grows we can explore this further. Thanks!

@ngm ngm closed this as completed Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants