json-ld / json-ld.org

JSON for Linked Data's documentation and playground site
https://json-ld.org/
Other
863 stars 152 forks source link

Best practice in cross-reference / discovery SHACL graph associated with a JSON-LD document #843

Open jmcanterafonseca-iota opened 4 months ago

jmcanterafonseca-iota commented 4 months ago

Dear all,

The case is the following:

Imagine a SHACL graph (S, shacl.jsonld, published on the Web) that defines the graph structure for a particular vocabulary V that is defined through a JSON-LD @context (C, jsonldcontext.jsonld, published on the Web). Then a JSON-LD document (D, document.jsonld) that uses vocabulary V, thus references C and wants to reference S as the way to validate the proper structure of the graph produced. Is there a way, best practice of referencing S within D so that it can be discovered by a processor of D?

Thank you very much for your help

jmcanterafonseca-iota commented 4 months ago

@msporny do you have any hint on this?

msporny commented 4 months ago

The closest thing, that I know of, that we have is specialized to Verifiable Credentials; the credentialSchema property: https://w3c.github.io/vc-data-model/#data-schemas

I know that people have also discussed annotation of a JSON-LD Context... note that a JSON-LD Context is just another JSON-LD Document that can contain statements about the context itself. This could be another place where you could list "acceptable data shapes". All that said, I don't think the community has settled on a best practice, nor a generalized solution, yet.