diff --git a/Gemfile.lock b/Gemfile.lock index 37866348..ab905ab6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,9 +1,10 @@ GIT remote: https://github.com/ruby-rdf/json-ld.git - revision: 74095b73cdb722b681f34d0f165599c9cb48d844 + revision: 172e0c960c9771fa9f963eca55d28fb63bce56b0 branch: develop specs: json-ld (3.0.2) + htmlentities (~> 4.3) json-canonicalization (~> 0.1) link_header (~> 0.0, >= 0.0.8) multi_json (~> 1.13) @@ -36,7 +37,7 @@ GEM i18n (1.6.0) concurrent-ruby (~> 1.0) json-canonicalization (0.1.0) - json-ld-preloaded (3.0.2) + json-ld-preloaded (3.0.3) json-ld (~> 3.0) multi_json (~> 1.12) rdf (~> 3.0) @@ -74,7 +75,7 @@ GEM sparql-client (~> 3.0) mini_portile2 (2.4.0) multi_json (1.13.1) - net-http-persistent (3.0.1) + net-http-persistent (3.1.0) connection_pool (~> 2.2) nokogiri (1.10.3) mini_portile2 (~> 2.4.0) @@ -82,7 +83,7 @@ GEM nokogiri public_suffix (3.1.1) rack (2.0.7) - rake (12.3.2) + rake (12.3.3) rdf (3.0.12) hamster (~> 3.0) link_header (~> 0.0, >= 0.0.8) @@ -134,7 +135,7 @@ GEM rdf-turtle (3.0.6) ebnf (~> 1.1) rdf (~> 3.0) - rdf-vocab (3.0.7) + rdf-vocab (3.0.8) rdf (~> 3.0, >= 3.0.11) rdf-xsd (3.0.1) rdf (~> 3.0) diff --git a/common/jsonld.js b/common/jsonld.js index bf3f8c62..27ca57ce 100644 --- a/common/jsonld.js +++ b/common/jsonld.js @@ -40,6 +40,19 @@ const jsonld = { status: 'unofficial', date: 'January 2014' }, + "JSON.API": { + title: "JSON API", + href: "https://jsonapi.org/format/", + authors: [ + 'Steve Klabnik', + 'Yehuda Katz', + 'Dan Gebhardt', + 'Tyler Kellen', + 'Ethan Resnick' + ], + status: 'unofficial', + date: '29 May 2015' + }, "JCS": { title: "JSON Canonicalization Scheme (JCS)", href: 'https://tools.ietf.org/html/draft-rundgren-json-canonicalization-scheme-05', diff --git a/common/terms.html b/common/terms.html index 6a7668bc..15a1ed8c 100644 --- a/common/terms.html +++ b/common/terms.html @@ -225,6 +225,9 @@ A named graph created from the value of a map entry having an expanded term definition where @container is set to @graph. +
included block
+ An included block is an entry in a node object where the key is either `@included` or an alias of `@included` + and the value is one ore more node objects.
index map
An index map is a map value of a term defined with @container set to @index, @@ -349,4 +352,4 @@ The vocabulary mapping is set in the context using the @vocab key whose value MUST be an IRI or null.
- \ No newline at end of file + diff --git a/index.html b/index.html index b88a18d6..6fb645e1 100644 --- a/index.html +++ b/index.html @@ -608,6 +608,10 @@

Syntax Tokens and Keywords

Used in a context definition to load an external context within which the containing context definition is merged. This can be useful to add JSON-LD 1.1 features to JSON-LD 1.0 contexts. +
`@included`
+ Used in a top-level node object to define an included block, + for including secondary node objects within another node object. +

All keys, keywords, and values in JSON-LD are case-sensitive.

@@ -8272,6 +8276,262 @@

Using the Document Base for the Default Vocabulary

+

Included Nodes

+

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:

+ +
+  
+  
+ +

When flattened, this will move the `enum:c6` and `enum:s2` elements + from the included block into the outer 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; + `@included` provide an analogous possibility in JSON-LD.

+ +

As a by product of the use of `@included` within node objects, a map may contain + only `@included`, to provide a feature similar to that described in , + where `@graph` is used to described disconnected nodes.

+ + + +

However, in contrast to `@graph`, `@included` does not interact with other properties + contained within the same map, a feature discussed further in .

+
+

Reverse Properties

JSON-LD serializes directed graphs. That means that @@ -8474,7 +8734,6 @@

Using the Document Base for the Default Vocabulary

expanded term definitions to create reverse properties as shown in the following example:

-
+
+

Included Blocks

+ +

An included block is used to provide a set of node objects. + An included block MAY appear as the value of a member of a node object with either the key of `@included` or an alias of `@included`. + An included block is either a node object or an array of node objects.

+ +

When expanding, multiple included blocks will be coalesced into a single included block.

+
+

Property Nesting

@@ -12246,6 +12522,12 @@

Keywords

This keyword is described further in , and . +
`@included`
+ The `@included` keyword MAY be aliased and + its value MUST be an included block. + This keyword is described further in , + and . +
@@ -13171,6 +13453,13 @@

Changes since JSON-LD Community Group Final Report

  • A context may contain an @import entry used to reference a remote context within a context, allowing JSON-LD 1.1 features to be added to contexts originally authored for JSON-LD 1.0.
  • +
  • A node object may include an included block, + which is used to contain a set of node objects which are treated + exactly as if they were node objects defined in an array including the containing + node object. + This allows the use of the object form of a JSON-LD document when there is more + than one node object being defined, and where those node objects + are not embedded as values of the containing node object.