Skip to content

Commit

Permalink
Add issue #41 marker for removing @omitDefault.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Mar 1, 2019
1 parent 347a015 commit aa17401
Showing 1 changed file with 63 additions and 1 deletion.
64 changes: 63 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,68 @@ <h4>Omit default flag</h4>
The initial value for the <a>omit default flag</a> is set using the
<a data-link-for="JsonLdOptions">omitDefault</a> option.
See <a href="#default-content" class="sectionRef"></a> for a further discussion.</p>

<pre id="sample-library-frame-with-omitDefault-set-to-true"
class="example nohighlight" data-transform="updateExample"
data-content-type="application/ld+json;profile=http://www.w3.org/ns/json-ld#framed"
data-frame-for="Flattened library objects"
title="Sample library frame with @omitDefault set to true">
<!--
{
"@context": {"@vocab": "http://example.org/"},
"@type": "Library",
****"description": {},****
"contains": {
"@type": "Book",
****"@explicit": true,****
****"title": {},****
"contains": {
"@type": "Chapter"
}
}
}
-->
</pre>

<p>The resulting output will exclude properties for Book which are not explicitly
listed in the <a>frame object</a>:</p>

<aside class="example ds-selector-tabs"
title="Framed library objects with @omitDefault set to true">
<div class="selectors">
<a class="playground"
data-result-for="#flattened-library-objects"
data-frame="#sample-library-frame-with-explicit-set-to-true"
target="_blank"></a>
</div>
<pre id="lib-example-output"
class="selected original nohighlight" data-transform="updateExample"
data-frame="Sample library frame with @omitDefault set to true"
data-result-for="Flattened library objects">
<!--
{
"@context": {"@vocab": "http://example.org/"},
"@graph": [{
"@id": "http://example.org/library",
"@type": "Library",
"contains": {
"@id": "http://example.org/library/the-republic",
"@type": "Book",
"contains": {
"@id": "http://example.org/library/the-republic#introduction",
"@type": "Chapter",
"description": "An introductory chapter on The Republic.",
"title": "The Introduction"
},
####"creator": "Plato", ← This property is omitted####
"title": "The Republic"
},
****"description": null**** ####← This property is explicit####
}]
}
-->
</pre>
</aside>
</section>

<section class="informative changed">
Expand Down Expand Up @@ -1068,7 +1130,7 @@ <h2>Syntax Tokens and Keywords</h2>
<dt><code>@omitDefault</code></dt>
<dd>Used in <a href="#framing">Framing</a> to override the
value of <a>omit default flag</a> within a specific frame.
<div class="issue">Is this flag really useful? Easier to simply not have a default value,
<div class="issue" data-number="41">Is this flag really useful? Easier to simply not have a default value,
if it shouldn't match.</div>
</dd>
<dt class="changed"><code>@requireAll</code></dt>
Expand Down

0 comments on commit aa17401

Please sign in to comment.