Support JSONLD

Description

Environment

None

Activity

Show:
Vladimir Alexiev
March 27, 2014, 1:36 PM

Hi Peter, I see a lot of activity on https://github.com/jsonld-java/jsonld-java/tree/master/integration/sesame, can you comment about the current status of htis task?
I see this is scheduled for 2.7.12 (maintenance release), I guess it can eb expected a couple months from now?

Peter Ansell
March 27, 2014, 10:13 PM

The JSON-LD-Java parser and writer are compliant with the JSON-LD-1.0 specification. Hence, the Sesame parser and writer in jsonld-java-sesame are also compliant with it.

However, until the core api for jsonld-java stabilises I don't want to depend on it from a Sesame release. In future when it stabilises I want to do what Jena has done and link to a specific jsonld-java version from each Jena release, but until then I would prefer if the relationship was focused the other way. We have a big advantage over Jena in that Sesame parsers and writers are never hardcoded into the API code, and are loaded at runtime using java.util.ServiceLoader, so we can be more flexible in the timeframe for integrating.

I would definitely recommend that you check out jsonld-java-sesame-0.3 and see if it works for you. I don't have time to do a 0.4 release with the new features for a few weeks but you could also try 0.4-SNAPSHOT if you want to experiment with it.

From a Sesame side you can use it just like any other parser or writer (ie, load them at runtime using Rio.createParser or Rio.parse, without hardcoding references to the actual classes in your code), including selecting pretty-printing and the output jsonld-mode using RDFWriter.getWriterConfig(), as described in the readme:

https://github.com/jsonld-java/jsonld-java/blob/master/integration/sesame/README.md

Peter Ansell
March 27, 2014, 10:22 PM

Also, the moving target for 2.7.12, and future versions, shouldn't be taken as an indication that the Sesame core development team are actually focusing on the task at this point in time btw. It is just how we are doing roughly-agile development. Once we start focusing on a task we generally change its status to "In Progress".

If you want to start using jsonld-java-sesame-0.3 and look through the features that it doesn't yet have or bugs in it then we can see how far away we are feature wise from satisfactorily closing this issue. It would be useful to track any suggestions you have on the GitHub tracker for the project so that Tristan King and other collaborators see them also.

I have been tracking and here as they need to be supported inside of the Sesame codebase, and are not as relevant to the JSONLD-Java project, but other features are more likely to be targeted at the GitHub tracker.

Also, jsonld-java-sesame-0.3 doesn't depend on Sesame-2.7.11, but you should be fine to use that and future 2.7.x versions together with it, as the linkage is very loose due to our use of java.util.ServiceLoader. I will add a note to the README.md on GitHub and in the changelog if we start depending on a particular 2.7.x version due to a bug fix or a new feature.

Vladimir Alexiev
March 28, 2014, 7:37 AM

Thanks for the in-depth comments!

Peter Ansell
July 16, 2014, 1:10 AM

The easiest way to support this across the RDF-1.0/RDF-1.1 boundary is going to be to keep jsonld-java-sesame as a Sesame-2.7 module, and create a sesame-rio-jsonld module to use from Sesame-2.8.x onwards which only has jsonld-java as a dependency (along with the dependencies from there)

The new sesame-rio-jsonld module is available for review in a pull request on BitBucket:

https://bitbucket.org/openrdf/sesame/pull-request/303/ses-1094-add-json-ld-module-for-sesame-28

Assignee

Peter Ansell

Reporter

Jeen Broekstra

Labels

None

Components

Priority

Minor
Configure