Description
Following setup:
I have a JSON-LD document with an @import statement (shortened):
{
"@context": {
"@version": 1.1,
"@import": "http://localhost:8080/some-document.jsonld",
},
"@graph": [
]
}
The referenced @import resolves to this document (shortened):
{
"@context": {
"rdfs": "https://www.w3.org/2000/01/rdf-schema#",
"xsd": "https://www.w3.org/2001/XMLSchema#",
"owl": "https://www.w3.org/2002/07/owl#",
"subClassOf": {
"@id": "rdfs:subClassOf",
"@type": "@id"
},
"import": {
"@id": "owl:import",
"@type": "@id"
},
"entry": {
"@id": "some:entry",
"@container": "@language"
}
}
}
Parsing the document gives the follwing error:
Error: Invalid term @container for 'label' ('0'), must be one of @list, @set, @index, @language, @graph, @id, @type
Parsing is done via jsonld-streaming-parser
.
The error is thrown on this line:
jsonld-context-parser.js/lib/ContextParser.ts
Line 492 in c1abad9
Actually, @language should be a valid term, as it is also used in the specification:
https://www.w3.org/TR/json-ld11/#example-71-language-map-expressing-a-property-in-three-languages
What I don't understand: Why is there a loop over the keys of objectValue
in your code? As I understand, objectValue
should already be a string and looping over it does not make sense to me.
Thanks in advance for your help, best regards,
gebsl