Are json-ld contexts allowed to have ":" in their keys? For example, is the following a valid json-ld document?
{
"@context": {
"abc:def": "http://abc-def.com/"
},
"@graph": [
{
"abc:def": "something"
}
]
}
I couldn't find any specific information on the spec. I tried to parse the above document using two of the most popular python libraries pyld
and rfdlib-jsonld
and one of them considers it an error, while the other parses fine. I also tried some online json-ld playgrounds and they also disagree on whether the above document is well formed.
pyld
gives an error saying Invalid JSON-LD syntax; term in form of IRI must expand to definition.
, while rdflib-jsonld
expands it to
[
{
"http://abc-def.com/": [
{
"@value": "something"
}
]
}
]
which one is correct?