json-ld.org
json-ld.org copied to clipboard
From an array of property-scoped @contexts, only the first one is applied in JSON-LD Playground
I have the following JSON-LD:
{
"@context": {
"@version": 1.1,
"@import": "https://ofn.gov.cz/věc/2020-07-01/kontexty/věc.jsonld",
"@propagate": true,
"nedefinováno": "https://slovník.gov.cz/nedefinováno/",
"Téma dizertační práce": {
"@id": "nedefinováno:téma-dizertační-práce",
"@context": {
"konzultant": {
"@id": "nedefinováno:konzultant",
"@context": [
"https://ofn.gov.cz/lidé-a-osoby/2020-07-01/kontexty/člověk-či-osoba.jsonld",
"https://pod-test.mvcr.gov.cz/otevřené-formální-normy/věda-a-výzkum/draft/kontexty/věda-a-výzkum.jsonld"
]
}
}
}
},
"typ": "Téma dizertační práce",
"název": {
"cs": "2D nanomateriály pro detekci polutantů v životním prostředí"
},
"konzultant": {
"typ": "Člověk",
"jméno": {
"cs": "Martin"
}
}
}
Note that konzultant has two external contexts in an array. The first one defines the type Člověk - a person. The second one defines type Výzkumník - researcher, which has everything a person has, plus some additional properties.
In the example above when
- I switch the order of the contexts in the array, OR
- I change
typ(alias of@type) fromČlověk(defined in the first context) toVýzkumník(defined in the second context), thekonzultantproperty stops being interpreted.