Closed davidlehn closed 8 months ago
It is explicitly not allowed. Specific keywords in @context
are called out in the context processing algorithm, everything else is a term definition. For a term definition @type
is accounted for and no other keywords are allowed.
I suspect there are some tests for this, but maybe not for @context
. I would be fine if such a negative test were added.
Added a test in #591. I think 4.2.2.5 is the relevant spec text. Looks like jsonld.js is recursively processing objects, and pulling out the @context
data if present. Works well to handle both regular context data and files with a @context
key. If this is an error, it does need a test. I'm surprised this wasn't noticed before.
Addressed with test for correct behavior: https://github.com/w3c/json-ld-api/pull/591.
How should a nested context behave?
jsonld.js will expand to:
Ruby Distiller errors:
Sophia errors:
If this isn't undefined behavior, there should be a positive or negative test for this case.