Implementation guidance: no namespace prefixes on predicates #141
Pinned
mrgarth
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
We are introducing a recommendations to improve the reliability of JSON-LD validation.
Example: recommended syntax changes
Previous form (uses namespace prefix):
org:hasName “My Name”Recommended form (no namespace prefix):
hasName [“My Name”]No namespace prefixes on properties
Through testing, we have determined that for JSON-LD processors to correctly use the
@contextfile to perform@typechecking on datatypes for values, there cannot be namespace prefixes on properties in JSON-LD. When the namespace prefix is included, the processor immediately expands the predicate to its full URI and bypasses the@typeinformation in the JSON-LD@contextfile.This functionality is valuable in that it provides quick checks on datatypes, e.g. checking that the value with
hasNameis anxsd:string, without resorting to full validation by SHACL. We have made some updates to our JSON-LD@contextfiles to ensure that all properties perform as expected with JSON-LD processors.IMPORTANT: namespace prefixes are still applied to class names when they are used as values with the
@typeproperty e.g.@type cids:Indicatoris still correct, and should not become@typeIndicator.Beta Was this translation helpful? Give feedback.
All reactions