The context is that I'm debugging a JSON API with JSON-LD keys and an
@context that I recommended .

riot from Jena 4.5.0 says :
$JENA/bin/riot --syntax=json-ld --verbose --debug 78272_pp-absolute.jsonld
09:42:21 ERROR riot            :: There was a problem encountered loading a
remote context [code=LOADING_REMOTE_CONTEXT_FAILED].

but using directly JsonLd.toRdf() succeeds :

import com.apicatalog.jsonld._
import scala.collection.JavaConverters._
val res2 = JsonLd.toRdf("file:/home/jmv/data/
grottocenter.org/tests_2022-05-10/78272_pp-absolute.jsonld")
  .get() .toList.asScala
for ( e <- res2 )
    println ( "<" + e.getSubject + "> <" + e.getPredicate + "> " +
e.getObject )

<_:b0> <http://purl.org/dc/terms/created> 2022-04-14T10:44:18.228Z^^
http://www.w3.org/2001/XMLSchema#string
<_:b0> <http://purl.org/dc/terms/creator> 3188^^
http://www.w3.org/2001/XMLSchema#integer
<_:b0> <http://purl.org/dc/terms/spatial> 78272^^
http://www.w3.org/2001/XMLSchema#integer
<_:b0> <http://www.w3.org/2000/01/rdf-schema#label> Trou de Beget^^
http://www.w3.org/2001/XMLSchema#string
etc ...

I'm afraid that it would not work with Jena API either.
As a side question, is there a way to configure riot or Jena API to have
(more) verbose JSON-LD error messages, possibly with line numbers.
Another side question, it seems that riot no longer accepts HTTP URL's ,
only files. Of course , it's easy to use wget or other tools, but that was
convenient ...

The test data are here : http://jmvanel.free.fr/test/?M=D

Jean-Marc Vanel
<http://semantic-forms.cc:1952/display?displayuri=http://jmvanel.free.fr/jmv.rdf%23me>
+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr
 Chroniques jardin
<http://semantic-forms.cc:1952/history?uri=http%3A%2F%2Fdbpedia.org%2Fresource%2FChronicle>

Reply via email to