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

Linking to a JSON-LD schema? #442

Open
trwnh opened this issue Sep 24, 2024 · 3 comments
Open

Linking to a JSON-LD schema? #442

trwnh opened this issue Sep 24, 2024 · 3 comments
Labels
best practice defer-future-version Defer this issue until a future version of JSON-LD

Comments

@trwnh
Copy link

trwnh commented Sep 24, 2024

Based on my understanding, "context is not a schema" -- @context serves to map terms to IRIs via term definitions, not to describe the actual data.

To address this, I've considered the following:

  • Serve a remote context document at one location, and serve a remote schema document at another location. Declare the remote context document as the @context. Manually import the schema document.
  • Serve the two in the same document. My understanding is that @context processing will only work with the @context entry of the resolved document ( as described in step 5.2.4 of the algorithm https://www.w3.org/TR/json-ld11-api/#algorithm ), so it is okay to put additional entries into the document, but it is not okay to put additional entries if the context was locally embedded instead. (Which is to say: a term definition having @id is a completely separate mechanism from what that @id represents, right?)

In the latter case (assuming I am correct that it is valid), there is a need to express that the document resolved not only contains a @context key to be used in context processing, but that it also contains a graph of statements representing RDF Schema, OWL, and other such metadata. For this, I wonder if it makes sense to declare a new keyword @schema, to be similarly applied until overridden by a more recent definition.

It's also possible I'm confused about all this, and there's a more idiomatic way to accomplish this. In either case, I'd appreciate feedback about this idea.

@gkellogg gkellogg added best practice defer-future-version Defer this issue until a future version of JSON-LD labels Nov 7, 2024
@VladimirAlexiev
Copy link

hi @trwnh ! I assume you mean JSON Schema?
There's been discussion of including $schema in addition to @context in YAML-LD, see json-ld/yaml-ld#11

@trwnh
Copy link
Author

trwnh commented Nov 10, 2024

Hi @VladimirAlexiev,

No, I meant an RDF Schema and/or OWL Ontology, serialized as JSON-LD.

For example: https://w3id.org/fep/1985.jsonld

@nichtich
Copy link

A JSON-LD document with its @context can be converted to a set of RDF triples. This triples may use IRIs from one or more RDF ontologies. Each ontology may formally be described in another RDF document. This schema RDF documents are unlikely given in JSON-LD but for instance in Turtle, RDF/XML or similar.

If RDF is not given in JSON-LD but for instance Turtle, there is often a list of namespace prefixes. These are no links to ontologies but can help to identify ontologies used in the data. Any way to link to RDF ontologies from JSON-LD would neither carry strict semantics but be just guidelines such as "hey, this might be of interest as well as the data in RDF uses resources from this ontology"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
best practice defer-future-version Defer this issue until a future version of JSON-LD
Projects
Status: Future Work
Development

No branches or pull requests

5 participants
@gkellogg @nichtich @VladimirAlexiev @trwnh and others