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

doc: JSON with JSON Schema in list of validators #6

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

candleindark
Copy link

@candleindark candleindark commented Feb 19, 2025

JSON doesn't provide validation of any data instances but JSON Schema does. I think JSON Schema is what was originally intended.

Additionally, is the listing of YAML needed since it seems that YAML is really JSON Schema specified in YAML format?

JSON doesn't provide validation of any
data instances but JSON Schema does.
@yarikoptic
Copy link
Member

well, there is more to the story:

  • JSON (and YAML) can already be validated to be syntactically correct. It is very basic but a validation
  • then on top, the content could be validated various ways
    • JSON Schema is one of the most popular but not the only way , e.g.
    • BIDS has its own schema (ad-hoc in a set of YAML files) and can validate side car json files against it
    • if it is some kind of jsonld (json with linked data), it could further be validated to be legit in LD sense. Eg. quick google lead me to archived attempt https://github.com/mulesoft-labs/json-ld-schema ...

@candleindark
Copy link
Author

In that case, may be I should have added "JSON Schema" to the list instead of replacing "JSON" with "JSON Schema". They are two different standards. What do you think?

For a widely used standard like JSON Schema, should our efforts to harmonize validation outputs focus solely on a specific validator implementation, such as python-jsonschema? There are many validator implementations available.

@yarikoptic
Copy link
Member

yarikoptic commented Feb 20, 2025

I think it might be worth refactoring that listing into a table since we keep talking about different aspects and would be useful to disentangle and not conflate

  • standards/formats containing the data (BIDS, JSON, DANDI schema, ...)
  • standards/formats which define how to validate the above (BIDS schema, JSON schema, LinkML, Pydantic ...)
  • validation tools which implement validation (BIDS: legacy bids-validator (old node; not schema driven; pre 2.0), bids-validator (TypeScript, using deno, --json output, starting from 2.0 more info), bidsschematools, WiP ; LinkML tools for python, ...; python-jsonschema, ...)

edit: @candleindark rightfully mentions that standard itself is not necessarily defines the format/standard for the validation results -- those are typically "validation tool" specific.

@yarikoptic
Copy link
Member

note: as for BIDS we elaborated a diagram which includes its components in

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

Successfully merging this pull request may close these issues.

2 participants