Closed weissjoh closed 2 years ago
Since enumtype
is defined with @type: @id
, its value is treated as a relative IRI, which is then resolved against the @base
in the term-scoped context. To get what you want here, you need to express it like this:
{
"@context": {
"enumtype": {
"@context": {
"@vocab": "http://myvocab.com/devices#"
},
"@type": "@vocab",
"@id": "http://myvocab.com/ownership#belongsTo"
}
},
"@id": "http://example.com/id-1",
"enumtype": "notebook"
}
@niklasl amazing. Thank you very much for your help. This actually solves the problem 👍
I have the case that within a JSON document is included which contains an attribute with a string. This value is pointing to an item of an enumeration resp. a named individual. However, just the name and not the full IRI.
I do get back the following turtle:
However, I am expecting the following result as turtle:
Interestingly the
devices#
from the@base
definition is cut off. I am wondering if there is some tweak possible to get my expected result. Here is the link to JSON-LD Playground.