diff --git a/index.html b/index.html index 35b76b6c..532c30a5 100644 --- a/index.html +++ b/index.html @@ -8277,22 +8277,148 @@
Sometimes it is useful to list node objects as part of another node object. - For instance, to represent a set of resources which are used by some other - resource. - In JSON-LD, these resources could all be contained as members of an array, - but this does not conveniently allow them to share a common context.
++ Most of the examples so far were about a top level node with its properties referring to, possibly, other nodes in a tree-like fashion. + However, there are cases when the data should combine several such objects within one JSON-LD document. + In JSON-LD, these resources could all be contained as members of an array: +
-Included resources are described in - Inclusion of Related Resources of [[[JSON.API]]] [[JSON.API]] - as a way to include related resources associated with some primary resource.
++ +-
In JSON-LD, included blocks may be used to collect such secondary node objects - which can be referenced from a primary node object. - Semantically, this is the same as if the node objects were embedded, or were contained - in some enclosing array.
++ The problem with this approach is that we lose the ability to use a common context. + To overcome this problem, included blocks may be used to collect such secondary node objects. + Semantically, this is the same as if the node objects were embedded or were contained in some enclosing array: +
-For an example, consider a node object containing a list of different items, + + +
Sometimes it is also useful to list node objects as part of another node object. + For instance, to represent a set of resources which are used by some other + resource. Included blocks may be also be used to collect such secondary node objects + which can be referenced from a primary node object. + For an example, consider a node object containing a list of different items, some of which share some common elements:
Using the Document Base for the Default Vocabulary -->+ +
Included resources are described in
+ Inclusion of Related Resources of [[[JSON.API]]] [[JSON.API]]
+ as a way to include related resources associated with some primary resource; @included
provide an analogous possibility in JSON-LD.
+
@graph
keyword collects such nodes in an array
and allows the use of a shared context.
+ More common usage in JSON-LD 1.1 would be to use the `@included` keyword + for such cases, and limit the use of `@graph` to describe named graphs. + See .
+