You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
@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 @language and direction are neither.
elsif !element.is_a?(Hash)
raise "Expected hash or array to create_node_map, got #{element.inspect}"
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 createNodeMap seems to generally just return at the same point.
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: