You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.html
+49-5Lines changed: 49 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -2331,7 +2331,11 @@ <h2>Sets and Lists</h2>
2331
2331
-->
2332
2332
</pre>
2333
2333
2334
-
<p>The implementation of <a>lists</a> in RDF depends on linking anonymous nodes together using the properties <code>rdf:first</code> and <code>rdf:rest</code>, with the end of the list defined as the resource <code>rdf:nil</code>. This can be represented as triples, as the following example shows, but the results are somewhat unwieldy.</p>
2334
+
<p>The implementation of <a>lists</a> in RDF depends on linking anonymous nodes
2335
+
together using the properties <code>rdf:first</code> and
2336
+
<code>rdf:rest</code>, with the end of the list defined as the resource
2337
+
<code>rdf:nil</code>. This can be represented as triples, as the following
2338
+
example shows:</p>
2335
2339
2336
2340
<tableclass="example">
2337
2341
<thead><tr>
@@ -2378,7 +2382,7 @@ <h2>Sets and Lists</h2>
2378
2382
</tbody>
2379
2383
</table>
2380
2384
2381
-
<p>Consequently, most RDF serializations (including JSON-LD) provide a syntactic shortcut for these lists. In Turtle, the graph would be expressed as follows:</p>
2385
+
<p>JSON-LD provides a syntactic shortcut for these lists. In Turtle, the graph would be expressed as follows:</p>
<pclass="changed">In JSON-LD 1.1, lists of lists, where the value of a <a>list object</a>, may itself be a <a>list object</a> recusively, are fully supported. For example, in <em>GeoJSON</em> (see [[RFC7946]]), <em>coordinates</em> are an ordered list of <em>positions</em>, which are represented as an array of two or more numbers. For example:</p>
2397
+
<pclass="changed">In JSON-LD 1.1, lists of lists, where the value of
2398
+
a <a>list object</a>, may itself be a <a>list object</a> recusively, are
2399
+
fully supported. For example, in <em>GeoJSON</em> (see [[RFC7946]]),
2400
+
<em>coordinates</em> are an ordered list of <em>positions</em>, which are
2401
+
represented as an array of two or more numbers. For example:</p>
2394
2402
2395
2403
<preclass="example changed"
2396
2404
data-content-type="application/json"
@@ -2413,7 +2421,10 @@ <h2>Sets and Lists</h2>
2413
2421
}
2414
2422
</pre>
2415
2423
2416
-
<pclass="changed">For this example, it's important that the values expressed within coordinates maintain their order, which requires the use of embedded list structures. In JSON-LD 1.1, we can express this using recursive lists, by simply adding the appropriate context definion:</p>
2424
+
<pclass="changed">For this example, it's important that the values
2425
+
expressed within coordinates maintain their order, which requires the use of
2426
+
embedded list structures. In JSON-LD 1.1, we can express this using recursive
2427
+
lists, by simply adding the appropriate context definion:</p>
2417
2428
2418
2429
<preclass="example changed"
2419
2430
data-content-type="application/json"
@@ -2443,7 +2454,40 @@ <h2>Sets and Lists</h2>
2443
2454
}
2444
2455
</pre>
2445
2456
2446
-
<pclass="changed">Note that coordinates includes three levels of lists. When expressed in Turtle, this would be the following:</p>
2457
+
<p>This is equivalent to the expanded form, which uses <a>list objects</a>:</p>
2458
+
2459
+
<preclass="example changed"
2460
+
data-content-type="application/json"
2461
+
data-transform="updateExample"
2462
+
title="Coordinates expressed in JSON-LD (expanded)">
0 commit comments