Andy Seaborne wrote:
> 
>> Do you have a generic JSON to RDF conversion code in Java?
> 
> Have your tried using JSON-LD to "upgrade" to RDF?
> 
> https://github.com/tristan/jsonld-java

Hi Andy,
interesting, I did not know about this project.

I gave it a try:

  Model model = ...
  InputStream inputStream = ...
  Object jsonObject = JSONUtils.fromInputStream(inputStream);
  JSONLDProcessor processor = new JSONLDProcessor();
  JenaTripleCallback callback = new JenaTripleCallback();
  callback.setJenaModel(model);
  processor.triples(jsonObject, callback);

Thanks for the link.

Paolo

> 
>     Andy
> 
> 

Reply via email to