Skip to content
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

Definition of yaml-ld namespace documents #77

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion ns/v1.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ <h2>Introduction</h2>
This document, and the associated documents in alternative formats, defines the YAML-LD Convenience Context.
This context defines terms that can be used in place of JSON-LD keywords
to simplify serialization of documents in YAML-LD, within the limitations
of using aliases of keywords in JSON-LD algorithms.
on using aliases of keywords in JSON-LD algorithms.
</p>

<section>
Expand Down
17 changes: 11 additions & 6 deletions spec/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -567,13 +567,18 @@ <h3>Convenience Context</h3>
-->
</pre>

<p>The <a>convenience context</a> contains an alias to every JSON-LD keyword which the JSON-LD 1.1
specification permits to be aliased &mdash; which means all the keywords except <code>@context</code>. The reserved `@` character is
replaced by `$`, which is not reserved and therefore does not require quoting. Consider
<a href="#example-example-yaml-ld-document-without-convenience-context"></a>
reformatted using the <a>convenience context</a>:</p>
<p>The <a>convenience context</a> contains an alias for every JSON-LD keyword
the JSON-LD 1.1 specifications permit to be aliased &mdash;
gkellogg marked this conversation as resolved.
Show resolved Hide resolved
JSON-LD does not allow `@context` to be aliased.
This allows YAML-LD to be created with minimal use of quoted keys.
The YAML-reserved "`@`" character is replaced by "`$`",
which is not reserved and therefore does not require quoting.
</p>

<p>This allows YAML-LD to be created with minimal use of <a>map</a> quoted keys (Note that the `@context` keyword cannot be aliased):</p>
<p>
Consider <a href="#example-example-yaml-ld-document-without-convenience-context"></a>
reformatted using the <a>convenience context</a>:
</p>

<pre class="example yaml"
data-transform="updateExample"
Expand Down