JSON-LD in Jena RIOT?

I got Jena 2.12.1 (2014-10-02) on the Apache Jena Releases page. It must support JSON-LD, according to Reading and Writing RDF in Apache Jena . But when I try to use riot with the JSON-LD output format, I get an error (and the same thing happens for options in uppercase, portable, etc.):

 riot --out=JSON-LD NIF-example2.ttl 

  Turtle N-Quads N-Triples TriG RDF_THRIFT Not recognized as an streaming RDF language : 'JSON-LD' 

How can I write in JSON-LD?

+5
source share
2 answers

He correctly identified JSON-LD. JSON-LD is not a stream output language (the writer needs all the data available before calling the jsonld-java code), and riot is a stream analyzer (it can handle files of any size) and must be written to the stream mode.

A tool for reading data into memory and writing it to rdfcat .

 rdfcat -out JSONLD NIF-example2.ttl 
+7
source

Later versions of RIOT (since the end of 2015) support JSONLD. However, I see no way to give it context

But he is ignored and creates his own context.

0
source

Source: https://habr.com/ru/post/1204365/


All Articles