Hi Phil,
That does not look like JSON-LD.
JSON-LD parsing ignores anything it does not understand, not give an
error. In your code snippet, no Jena involved,
Object compact
is a jsonld-data object "Dataset" (which isn't a Jena Dataset) with
nothing in it.
JSON-LD parsing ignores anything it does not understand, not give an error.
Jena translates the output of JsonLdProcessor.toRDF to Jena objects. If
there is an empty input, you get an empty output.
On 25/07/2021 11:11, Philipp Leeb wrote:
Hi Andy,
this ist he output when using JsonUtils:
{
"@default" : [ {
"subject" : {
"type" : "IRI",
"value" : "urn:dev:ops:32473-wotdirectory-1234"
},
"predicate" : {
"type" : "IRI",
"value" : "http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
},
"object" : {
"type" : "IRI",
"value" : "https://w3id.org/saref#Device"
}
That would be in JSON-LD:
{
"@id" : "urn:dev:ops:32473-wotdirectory-1234",
"@type" : "https://w3id.org/saref#Device"
}
or there needs to be a @context
Try it at:
https://json-ld.org/playground/
Andy