<dependency>
<groupId>com.github.jsonld-java</groupId>
<artifactId>jsonld-java-rdf2go</artifactId>
<version>0.12.0</version>
</dependency>
import com.github.jsonldjava.rdf2go.*;
ModelSet modelSet = ...; // also works with a Model
RDF2GoRDFParser parser = new RDF2GoRDFParser();
Object json = JSONLD.fromRDF(modelSet, parser);
RDF2GoTripleCallback callback = new RDF2GoTripleCallback();
ModelSet model = (ModelSet) JSONLD.toRDF(input, callback);