On 11/02/14 09:30, Olivier Rossel wrote:
Great news!
Could we use the JSON-LD output fixed algorithm in Fuseki, so a CONSTRUCT
content-negociated for JSON-LD returns data formatted with this very same
algorithm?
You can conneg for JSON-LD in the latest development build:
wget -O- -q --header 'Accept: application/ld+json'
'http://localhost:3030/ds/query?query=CONSTRUCT { <x:s> <x:p> <x:o> }
WHERE {} '
==>
{
"@context" : {
"p" : {
"@id" : "x:p",
"@type" : "@id"
}
},
"@id" : "x:s",
"p" : "x:o"
}
or did you mean something different?
Andy
On Mon, Feb 10, 2014 at 10:09 PM, Andy Seaborne <[email protected]> wrote:
Jena, in the current development builds, has integrated support for
JSON-LD. This includes Fuseki.
The core engine is com.github.jsonld-java:jsonld-java by Tristan King and
Peter Ansell [1]; they did the real work of implementing the algorithms of
the JSON-LD spec. Jena integrates with names for JSON-LD, a reader and a
writer (no special initialization necessary).
JSON-LD output is currently a fixed algorithm for turning a model into a
JSON-LD document. Patches welcome.
The code check that the new dependency is on the classpath. jsonld-java
itself depend on com.fasterxml.jackson [2] for JSON parsing and writing.
The Jena integration is tracked as JENA-634.
Have fun,
Andy
[1] https://github.com/jsonld-java/
[2] https://github.com/FasterXML/jackson