Test t0008:
{
"@context": {
"ex": "http://example.org/vocab#"
},
"@id": "http://example.org/test",
"ex:test": { "@value": "test", "@language": "en" },
"ex:drop-lang-only": { "@language": "en" },
"ex:keep-full-value": { "@value": "only value" }
}
expands to:
[
{
"@id": "http://example.org/test",
"http://example.org/vocab#test": [ { "@value": "test", "@language": "en" } ],
"http://example.org/vocab#keep-full-value": [ {"@value": "only value"} ]
}
]
Based on the expansion algorithm steps 17 and 20, I'm not sure why ex:drop-lang-only is dropped.
Expansion 13.9 will recursively call expansion on "ex:drop-lang-only": { "@language": "en" },
and steps 17 and 20 will result in an empty array being returned.
I think 13.10 is where dropping is expect to happen, but that cannot occur because expanded value
is not null
, it's an empty array.
Step 17 needs to change to return
null
early instead of allowing step 20 to change it to an empty list.