- From: Henry Story <henry.story@bblfish.net>
- Date: Wed, 1 Feb 2023 11:12:57 +0100
- To: public-n3-dev@w3.org
- Cc: Patrick Hochstenbach <Patrick.Hochstenbach@UGent.be>, Gregg Kellogg <gregg@greggkellogg.net>
> On 1. Feb 2023, at 08:10, Patrick Hochstenbach <Patrick.Hochstenbach@UGent.be> wrote: > >> From: Henry Story <henry.story@bblfish.net> >> Date: Tuesday, 31 January 2023 at 20:59 >> To: public-n3-dev@w3.org <public-n3-dev@w3.org> >> Subject: Json-LD to N3? >> Hi, >> >> I find Json-LD a bit opaque to read. Is there a way I can convert it to n3, >> so I can see clearly what the graphs are? >> >> I can use the json-ld playground to convert it to Nquads, but I could >> not see how to get nquads to n3 using eye. >> >> Henry > > I always use easyrdf.org for conversions: > https://www.easyrdf.org/converter > Patrick I am trying to convert the examples from the Verifiable Credentials Data Model spec such as https://www.w3.org/TR/vc-data-model/#example-a-simple-example-of-a-verifiable-credential so that I can clearly work out what is a quoted graph and what is not. That type of information is very much obscured by JSON-LD, even though it is essential to understanding claims. Easyrdf does not give me any output when I tried to convert the cleaned up Verifiable Claim example [1]. Greg Kellog pointed me to his RDF distiller http://rdf.greggkellogg.net/distiller?command=serialize&format=jsonld&output_format=n3 And that gives the n3 result as shown in the second snippet of [1]. That is consistent with the result given by first going through https://json-ld.org/playground/ and first converting to NQuads (third snipped in [1]) and then using distiller to convert nquads to n3. Interestingly both of those seem to reveal a problem with the first example json-ld, as it produces the following two triples in n3 <did:example:c276e12ec21ebfeb1f712ebc6f1> schema:name [], [] . But one can see quite clearly that the same is true in nquads. Greg Kellog suggested this may be a problem with ”value” and ”lang” fields not having been declared, and indeed when using the jsonld playground it helpfully suggests using @value and @language instead. With that we then get the jsonld in [2] and the nquads and n3 conversions that go with it using distiller. Now I would have expected the graph to be signed to be quoted, and linked to by a signature. We seem to be having the opposite going on here. Henry [1] https://gist.github.com/bblfish/908145116b14486af9dd3460ce14b2c1 [2] https://gist.github.com/bblfish/ab1b450c725674a4386cfc391b7e307b
Received on Wednesday, 1 February 2023 10:13:24 UTC