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

Create JSON schema for hubmeta #3

Open
Tracked by #27
annakrystalli opened this issue Oct 26, 2022 · 0 comments
Open
Tracked by #27

Create JSON schema for hubmeta #3

annakrystalli opened this issue Oct 26, 2022 · 0 comments

Comments

@annakrystalli
Copy link

Wasn't sure where the best place for this issue is. I decided here but we can reference it in other repos to keep track of it

The purpose of the schema is two-fold:

  1. Act as documentation of expectations of vallid hubmeta.json.
  2. Be used to validate json hubmeta files against.

PROs

  • simple one step validation which can be performed using many languages/tools. This means validation is not encode in language specific code.
  • human readability of file makes standards inspectable by users

CONs (within the hubUtils) context

  • package jsonvalidate which can be used to perform validations depends on package V8 and underlying V8 javascript and webassembly engine. Since 2020, it's much easier to install V8 (work out of the box with install.packages("V8") on maOS & Windows) it does need separate installation of the V8 C++ engine on Linux. This used to be problematic on systems e.g. without sudo rights but an alternative option to automatically download a static build of libv8 during package installation is now available.
  • While it appears json schema can be used to validate yaml, I can't find a tool for it in R. We can always however convert yaml to json prior to validating.

Initial resources

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

1 participant