json-ld-api
json-ld-api copied to clipboard
`expand-manifest.jsonld#tc037` mismatches the Playground
Manifest
jq '.sequence[] | select(."@id" == "#tc037")' tests/expand-manifest.jsonld
which gives:
{
"@id": "#tc037",
"@type": [
"jld:PositiveEvaluationTest",
"jld:ExpandTest"
],
"name": "property-scoped contexts which are alias of @nest",
"purpose": "Nesting terms may have property-scoped contexts defined.",
"input": "expand/c037-in.jsonld",
"expect": "expand/c037-out.jsonld",
"option": {
"specVersion": "json-ld-1.1"
}
}
Input
cat tests/$(jq -r '.sequence[] | select(."@id" == "#tc037") | .input' tests/expand-manifest.jsonld) | jq
that gives
{
"@context": {
"@version": 1.1,
"@vocab": "http://example.org/",
"nest": {
"@id": "@nest",
"@context": {
"@vocab": "http://example.org/nest/"
}
}
},
"nest": {
"property": "should be in /nest"
}
}
Expected output
cat tests/$(jq -r '.sequence[] | select(."@id" == "#tc037") | .expect' tests/expand-manifest.jsonld) | jq
which gives
[
{
"http://example.org/nest/property": [
{
"@value": "should be in /nest"
}
]
}
]
What about the JSON-LD Playground?
[
{
"http://example.org/property": [
{
"@value": "should be in /nest"
}
]
}
]
Difference
+ "http://example.org/nest/property": [
- "http://example.org/property": [
Question
My understanding of @nest logic is insufficient to judge who's right here. Any thoughts?