Skip to content

Commit a99fcd4

Browse files
committed
Don't make values of @included values of the property referencing the containing node object. Changes Flattening and expected toRdf tests.
1 parent 5a86ac7 commit a99fcd4

File tree

5 files changed

+17
-8
lines changed

5 files changed

+17
-8
lines changed

common/jsonld.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ const jsonld = {
4040
status: 'unofficial',
4141
date: 'January 2014'
4242
},
43+
"JSON.API": {
44+
title: "JSON API",
45+
href: "https://jsonapi.org/format/",
46+
authors: [
47+
'Steve Klabnik',
48+
'Yehuda Katz',
49+
'Dan Gebhardt',
50+
'Tyler Kellen',
51+
'Ethan Resnick'
52+
],
53+
status: 'unofficial',
54+
date: '29 May 2015'
55+
},
4356
"JCS": {
4457
title: "JSON Canonicalization Scheme (JCS)",
4558
href: 'https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-05',

common/terms.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@
226226
having an <a>expanded term definition</a>
227227
where <code>@container</code> is set to <code>@graph</code>.</dd>
228228
<dt class="changed"><dfn data-cite="JSON-LD11#dfn-included-block">included block</dfn></dt><dd class="changed">
229-
An <a>included block</a> is an <a>entry</a> in a <a>node object</a> where the key is `@included` or an alias
229+
An <a>included block</a> is an <a>entry</a> in a <a>node object</a> where the key is either `@included` or an alias of `@included`
230230
and the value is one ore more <a>node objects</a>.</dd>
231231
<dt><dfn data-cite="JSON-LD11#dfn-index-map">index map</dfn></dt><dd>
232232
An <a>index map</a> is a <a>map</a> value of a <a>term</a>
@@ -352,4 +352,4 @@
352352
The vocabulary mapping is set in the <a>context</a> using the <code>@vocab</code> key
353353
whose value MUST be an <a>IRI</a> or <code>null</code>.</dd>
354354
</dl>
355-
</section>
355+
</section>

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4314,7 +4314,7 @@ <h3>Algorithm</h3>
43144314
the <code>@graph</code> <a>entry</a> from <var>element</var>.</li>
43154315
<li class="changed">If <var>element</var> has an `@included` <a>entry</a>,
43164316
recursively invoke this algorithm passing the value of the `@included <a>entry</a> for <var>element</var>,
4317-
<var>node map</var>, <var>active subject</var>, <var>active property</var>, and <var>active graph</var>
4317+
<var>node map</var>, and <var>active graph</var>
43184318
before removing the `@included` <a>entry</a> from <var>element</var>.</li>
43194319
<li>Finally, for each key-value pair <var>property</var>-<var>value</var> in <var>element</var> ordered by
43204320
<var>property</var> perform the following steps:

tests/flatten/in05-out.jsonld

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[{
22
"@id": "_:b0",
3-
"http://example.org/prop": [
4-
{"@id": "_:b1"},
5-
{"@id": "_:b2"}
6-
]
3+
"http://example.org/prop": [{"@id": "_:b1"}]
74
}, {
85
"@id": "_:b1",
96
"@type": ["http://example.org/Foo"]

tests/toRdf/in05-out.nq

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
_:b0 <http://example.org/prop> _:b1 .
2-
_:b0 <http://example.org/prop> _:b2 .
32
_:b1 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Foo> .
43
_:b2 <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://example.org/Bar> .

0 commit comments

Comments
 (0)