Skip to content

Commit 6390be2

Browse files
committed
Improve normative definition of **JSON-LD document**, **node object**, and **graph object**.
Fixes #543.
1 parent 25ffb1d commit 6390be2

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

spec/latest/common/terms.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
A <a>graph object</a> represents a <a>named graph</a> represented as the
128128
value of a <a>property</a> within a <a>node object</a>. When expanded, a
129129
graph object MUST have an <code>@graph</code> member, and may also have
130-
<code>@context</code>, <code>@id</code>, and <code>@index</code> members.
130+
<code>@id</code>, and <code>@index</code> members.
131131
A <dfn class="preserve" data-lt="simple graph objects">simple graph object</dfn> is a
132132
<a>graph object</a> which does not have an <code>@id</code> member. Note
133133
that <a>node objects</a> may have a <code>@graph</code> member, but are

spec/latest/json-ld/index.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4370,9 +4370,10 @@ <h1>JSON-LD Grammar</h1>
43704370
in the <a>JSON-LD internal representation</a> that is equivalent to
43714371
valid <a data-cite="RFC7159#section-2">JSON text</a></span>.</p>
43724372

4373-
<p>A <a>JSON-LD document</a> MUST be a single <a>node object</a>
4374-
or an <a>array</a> whose elements are each
4375-
<a>node objects</a> at the top level.</p>
4373+
<p>A <a>JSON-LD document</a> MUST be a single <a>node object</a>,
4374+
a <a>JSON object</a> consisting of only
4375+
the members <code>@context</code> and/or <code>@graph</code>,
4376+
or an <a>array</a> or zero or more <a>node objects</a>.</p>
43764377

43774378
<p>In contrast to JSON, in JSON-LD the keys in <a data-lt="JSON object">objects</a>
43784379
MUST be unique.</p>
@@ -4425,7 +4426,8 @@ <h2>Node Objects</h2>
44254426
<a>context</a> and:</p>
44264427

44274428
<ul>
4428-
<li>it is the top-most <a>JSON object</a> in the JSON-LD document,</li>
4429+
<li>it is not the top-most <a>JSON object</a> in the JSON-LD document consisting
4430+
of no other members than <code>@graph</code> and <code>@context</code>,</li>
44294431
<li>it does not contain the <code>@value</code>, <code>@list</code>,
44304432
or <code>@set</code> keywords, and</li>
44314433
<li class="changed">it is not a <a>graph object</a>.</li>
@@ -5124,7 +5126,6 @@ <h4>Open Issues</h4>
51245126
<p class="issue defer" data-number="397"></p>
51255127
<p class="issue defer" data-number="443"></p>
51265128
<p class="issue defer" data-number="491"></p>
5127-
<p class="issue" data-number="543"></p>
51285129
<p class="issue defer" data-number="547"></p>
51295130
<p class="issue defer" data-number="548"></p>
51305131
<p class="issue defer" data-number="583"></p>

0 commit comments

Comments
 (0)