Description
In PR #445, @lanthaler had a concern that a 1.0 processor would silently ignore extra properties of an expanded term definition, such as @context
as specified for #247. As it happens, this is one of the few places the 1.0 algorithms didn't look for extra values to raise an exception.
One way to do this is using the processingMode
API option, which is defined to be json-ld-1.1
for the 1.1, or json-ld-1.0
for the Recommendation. But, in most cases, this can't be specified, and there's no way to determine what version a document is intended for.
One solution is require that a context using 1.1 features specifically announce this using @version
.
{
"@context": {
"@version": 1.1,
"term-using-1.1-features": {"@context": {...}}
}
}
I would say that either processingMode
is specified explicitly (keeping the default at json-ld-1.0
), or that the context contains @version
. One consideration is that Framing now uses processingMode: json-ld-1.1-expand-frame
to allow the special features in a frame document, and adding this using @version
would be problematic.
That said, another solution would be to create an erratum on 1.0 to add better checking for keys in an expanded term definition, and possibly other places, as may prove necessary.