-
Notifications
You must be signed in to change notification settings - Fork 197
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
Improve @language
and @direction
safe mode checks.
#541
Comments
@gkellogg would love your take on why this happens. Distiller throws an error, so it's likely a bug in jsonld.js (and therefore the JSON-LD Playground). I doubt it's something we could make use of in a JSON-LD 1.2--i.e. allowing the use of these for the document even when a context file is provided out of band. Would be kind of nice, though, potentially (assuming it's not a breaking change for all other JSON-LD libraries). At any rate, knowing the right error to through here would help--as I couldn't sort that out from the processing spec. |
The spec is silent on this. My implementation does generate an error when generating RDF, but it seems to be due to some other failed expectation, and not specifically looking for node objects which contain keywords only expected in value objects. The error is actually coming from the Node Map Generation algorithm, where it expects element to either be an array or a map, and keywords such as
The algorithm doesn't say what to do if element is neither an array nor a map; my implementation raises an error. Looking at jsonld.js Lines 56 to 61 in e2f6523
|
If
@language
and/or@direction
are incorrectly used as a regular properties, they appear in expanded output, but are silently dropped when converting to RDF quads. Determine if this should be a general error, general warning, safe mode error, or something else. May need main spec and/or test suite updates. May need to check if this happens with other keywords as well.The text was updated successfully, but these errors were encountered: