- From: Gregg Kellogg <gregg@greggkellogg.net>
- Date: Sun, 9 Jun 2024 11:49:10 -0700
- To: Thomas Francart <thomas.francart@sparna.fr>
- Cc: Public Shacl W3C <public-shacl@w3.org>, public-json-ld-wg@w3.org
- Message-Id: <571D2BC7-D165-4CC4-83B4-BF4EAA5DA934@greggkellogg.net>
> On Jun 7, 2024, at 3:31 AM, Thomas Francart <thomas.francart@sparna.fr> wrote: > > Hello SHACL & JSON-LD lovers > > I have SHACL specs. I also have APIs that return JSON-LD. The JSON-LD is built from RDF using a manually maintained context + JSON-LD framing specs. > > My question is how I could bridge my SHACL with my JSON-LD context + framing, to have a completely model-driven architecture. In other words can I generate the context + framing from the SHACL (probably using some extra annotations). > > Generating a default context from the SHACL is relatively easy [1]. My question is on the framing part, specifically on the hierarchical structure of the JSON. How can I indicate in the SHACL model : > which shapes are the roots of the JSON-LD structure ? > which properties use embedding in the JSON-LD structure ? ("@embed": "@always") and which should be simply references to URIs ? > The ability to specify the (or a) hierarchical view of my graph structure could be useful, even for an RDF/XML serialization, or an HTML rendering of a dataset. As you note, there is no standard way to do this. I recall some discussions in the ShEx group about using some of their semantic operations to effectively frame the matched RDF as JSON, which could potentially be used to generate a frame. Something similar could potentially be done with SHACL, as it’s similar to the form-generated RDF use case in some ways, but I’m not familiar with any work in the area. Gregg > Any ideas or pointers on this ? > > Cheers > Thomas > > [1] : https://shacl-play.sparna.fr/play/context#documentation - a simplistic JSON-LD context derivation from a SHACL spec. > > -- > > Thomas Francart - SPARNA > Web de données | Architecture de l'information | Accès aux connaissances > blog : blog.sparna.fr <http://blog.sparna.fr/>, site : sparna.fr <http://sparna.fr/>, linkedin : fr.linkedin.com/in/thomasfrancart <https://fr.linkedin.com/in/thomasfrancart> > tel : +33 (0)6.71.11.25.97, skype : francartthomas
Received on Sunday, 9 June 2024 18:49:27 UTC