-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@version announcement for enabling 1.1 features #446
Comments
See @lanthaler's comment in #445 (review) |
I dislike ‘version‘ properties. |
@akuckartz Do you have an alternative suggestion for how to ensure that 1.0 implementations don't silently ignore 1.1 features? |
My thought here is to not define a default for If not specified through the API, Context processing establishes a This allows legacy contexts to be used along with 1.1 contexts, as long as the 1.1 context is established first, or the version is set explicitly through the API. 1.0 processors will (should) have implicitly set version to 1.0, and will (should) error when encountering a The consequence for this when expanding is that the version cannot be absolutely established until after context processing. |
SGTM |
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 bejson-ld-1.1
for the 1.1, orjson-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
.I would say that either
processingMode
is specified explicitly (keeping the default atjson-ld-1.0
), or that the context contains@version
. One consideration is that Framing now usesprocessingMode: 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.
The text was updated successfully, but these errors were encountered: