Integration of JSONLD-Java with RDF2GO
Java
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
.gitignore
.travis.yml
LICENCE
README.md
pom.xml

README.md

JSONLD-Java RDF2Go Integration module

Build Status Coverage Status

USAGE

From Maven

<dependency>
    <groupId>com.github.jsonld-java</groupId>
    <artifactId>jsonld-java-rdf2go</artifactId>
    <version>0.8.3</version>
</dependency>

Serializing RDF into JSON-LD using RDF2GoRDFParser

import com.github.jsonldjava.rdf2go.*;

ModelSet modelSet = ...; // also works with a Model
RDF2GoRDFParser parser = new RDF2GoRDFParser();
Object json = JSONLD.fromRDF(modelSet, parser);

Parsing JSON-LD, and convert it into a ModelSet

RDF2GoTripleCallback callback = new RDF2GoTripleCallback();
ModelSet model = (ModelSet) JSONLD.toRDF(input, callback);