Skip to content

Clarify why processing @context is useful for JSON-based processors. #546

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

Merged
merged 4 commits into from
Apr 24, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 26 additions & 10 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1823,8 +1823,8 @@ <h3>Lifecycle Details</h3>
</ol>

<p class="note">
The order of the steps above is not fixed, and some steps might be taken
more than once. Such step-recurrence may be immediate or at any later
The order of the steps above is not fixed, and some steps might be taken
more than once. Such step-recurrence may be immediate or at any later
point in the sequence as performed.
</p>

Expand Down Expand Up @@ -2105,20 +2105,17 @@ <h3>Extensibility</h3>
<h4>Semantic Interoperability</h4>

<p>
This specification endeavors to enable both the JSON and JSON-LD syntaxes to
be semantically compatible with one another without the JSON implementations
needing to process the documents as JSON-LD. To achieve this, the
specification imposes the following additional restrictions on both syntaxes:
This specification ensures that "plain" JSON and JSON-LD syntaxes are
semantically compatible without requiring JSON implementations to use a
JSON-LD processor. To achieve this, the specification imposes the following
additional requirements on both syntaxes:
</p>

<ul>
<li>
JSON-based processors MUST process the <code>@context</code> <a>property</a>,
ensuring the expected values exist in the expected order for the
<a>credential</a> type being processed. It is advised that the expected order
of values of the <code>@context</code> <a>property</a> should be defined by
at least a human-readable extension specification and preferably by a
machine-readable specification as well.
<a>credential</a> type being processed.
</li>
<li>
JSON-LD-based processors MUST produce an error when a JSON-LD context
Expand All @@ -2131,6 +2128,25 @@ <h4>Semantic Interoperability</h4>
</li>
</ul>

<p>
A human-readable document describing the expected order of values for the
<code>@context</code> <a>property</a> is expected to be published by any
implementer seeking interoperability. A machine-readable description
(i.e., a normal JSON-LD Context document) is expected to be published
at the URL specified in the <code>@context</code> <a>property</a> by
JSON-LD implementers seeking interoperability.
</p>

<p>
The requirements above guarantee semantic interoperability between JSON and
JSON-LD for terms defined by the <code>@context</code> mechanism. While JSON-LD
processors will use the specific mechanism provided and can verify that all
terms are correctly specified, JSON-based processors implicitly accept the same
set of terms without testing that they are correct. In other words, the context
in which the data exchange happens is explicitly stated for both JSON and
JSON-LD by using the same mechanism. With respect to JSON-based processors,
this is achieved in a lightweight manner, without having to use JSON-LD
processing libraries.
</section>
</section>

Expand Down