From b8ac517bec1c7313610cc560a3ac95a91ea16c1f Mon Sep 17 00:00:00 2001
From: Gregg Kellogg
This document has been developed by the JSON-LD Working Group and was derived from the JSON-LD Community Group's Final Report.
There is a live JSON-LD playground that is capable of demonstrating the features described in this document.
- +This specification is intended to supersede the [[[JSON-LD10-API]]] [[JSON-LD10-API]] specification.
++ This document includes Candidate Corrections to the current + W3C Recommendation dated 16 July 2020.
@id
, nor @json
,
nor @none
,
- nor @vocab
,
+ nor @vocab
,
nor an IRI,
an invalid type mapping
error has been detected and processing is aborted.@reverse
:
+ This changes the algorithm for processing a reverse term so that it doesn't return early. + For more information, refer to issue 565.
+@id
or @nest
, entries, an
invalid reverse property
@@ -1664,10 +1672,10 @@ true
.true
@id
and its value
+ @id
and its value
does not equal term:
@id
entry of value
@@ -1894,7 +1902,7 @@ @id
,
@reverse
, @container
,
- @context
,
+ @context
,
@direction
,
@index
,
@language
,
@@ -2961,7 +2969,7 @@ @value
, an
invalid @nest value error
has been detected and processing is aborted.This algorithm step omitted two additional steps + which include nesting-key in addition to nested value. + For more information, refer to issue 380.
+@graph
or otherwise does not match one of the previous cases.
@@ -3862,9 +3881,15 @@ @index
in expanded item, if any.@index
and index key is not @index
:
+ The value of `@index` on a property map can be a Compact IRI in addition to an IRI. + The Compaction Algorithm is updated to first expand this value before re-compacting it. + For more information, refer to issue 380.
+Transforms the given input into an RdfDataset according to the steps in the Deserialize JSON-LD to RDF Algorithm:
+This changes the default for extractAllScripts to be `false`, + which is consistent with the wording in Embedding JSON-LD in HTML Documents in [[JSON-LD11]]. + For more information, refer to issue 603.
+false
,
+ and {{JsonLdOptions/extractAllScripts}} defaulting to true
.
false
,
the promise is rejected with a JsonLdError whose {{JsonLdError/code}} is set to loading document failed
- and processing is terminated.true
.
Set document to a new empty array.
For each JSON-LD script element in input:
@@ -6838,187 +6870,57 @@ relative iri compaction.
-@context
entry, which defines a context used for values of
- a property identified with such a term. This context is used
- in both the Expansion Algorithm and
- Compaction Algorithm.@nest
entry, which identifies a term expanding to
- @nest
which is used for containing properties using the same
- @nest
mapping. When expanding, the values of an entry
- expanding to @nest
are treated as if they were contained
- within the enclosing node object directly.@container
values within an expanded term definition may now
- include @id
and @type
, corresponding to id maps and type maps.@none
value, but
- JSON-LD 1.0 only allowed string values. This has been updated
- to allow (and ignore) @none
values.@container
in an expanded term definition
- can also be an array containing any appropriate container
- keyword along with @set
(other than @list
).
- This allows a way to ensure that such entry values will always
- be expressed in array form.@prefix
entry with the value true
. The 1.0 algorithm has
- been updated to only consider terms that map to a value that ends with a URI
- gen-delim character.@container
to include @graph
,
- along with @id
, @index
and @set
.
- In the Expansion Algorithm, this is
- used to create a named graph from either a node object, or
- objects which are values of entries in an id map or index map.
- The Compaction Algorithm allows
- specific forms of graph objects to be compacted back to a set of node objects,
- or maps of node objects.@none
keyword, or an alias, for
- values of maps for which there is no natural index. The Expansion Algorithm removes this indexing
- transparently.Note that this change log only identifies substantive changes since [[[JSON-LD10-API]]].
-false
This is used in algorithms to
- control iteration of map entry keys. Previously, the
- algorithms always required such an order. The instructions for
- evaluating test results have been updated accordingly.@type
, or an alias of @type
, may now have their @container
set to @set
- to ensure that @type
entries are always represented as an array. This
- also allows a term to be defined for @type
, where the value MUST be a map
- with @container
set to @set
.:
), but
- prefix is not a term, to only return value
- if it has the form of an IRI, otherwise fall through to
- the rest of the algorithm.text/html
as input,
- extracting either a specifically targeted script element,
- the first found JSON-LD script element,
- or all JSON-LD script elements."@type": "@none"
in a term definition to prevent value compaction.@propagate
- entry in a local context.@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
.@vocab
in
- a context. When this is set, vocabulary-relative IRI references, such as the
- entries of node objects, are expanded or compacted relative
- to the base IRI and the vocabulary mapping using string concatenation.and returnfrom the end of step 13, and revise step + 14 to begin with
Otherwise, + as described in Candidate Correction 3.
All changes are editorial and do not affect the observable behavior of the API nor the expected test results.
All changes are editorial and do not affect the observable - behavior of the API nor the expected test results.
+ + +and returnfrom the end of step 13, and revise step - 14 to begin with
Otherwise.
false
This is used in algorithms to
+ control iteration of map entry keys. Previously, the
+ algorithms always required such an order. The instructions for
+ evaluating test results have been updated accordingly.@type
, or an alias of @type
, may now have their @container
set to @set
+ to ensure that @type
entries are always represented as an array. This
+ also allows a term to be defined for @type
, where the value MUST be a map
+ with @container
set to @set
.:
), but
+ prefix is not a term, to only return value
+ if it has the form of an IRI, otherwise fall through to
+ the rest of the algorithm.text/html
as input,
+ extracting either a specifically targeted script element,
+ the first found JSON-LD script element,
+ or all JSON-LD script elements."@type": "@none"
in a term definition to prevent value compaction.@propagate
+ entry in a local context.@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
.@vocab
in
+ a context. When this is set, vocabulary-relative IRI references, such as the
+ entries of node objects, are expanded or compacted relative
+ to the base IRI and the vocabulary mapping using string concatenation.@context
entry, which defines a context used for values of
+ a property identified with such a term. This context is used
+ in both the Expansion Algorithm and
+ Compaction Algorithm.@nest
entry, which identifies a term expanding to
+ @nest
which is used for containing properties using the same
+ @nest
mapping. When expanding, the values of an entry
+ expanding to @nest
are treated as if they were contained
+ within the enclosing node object directly.@container
values within an expanded term definition may now
+ include @id
and @type
, corresponding to id maps and type maps.@none
value, but
+ JSON-LD 1.0 only allowed string values. This has been updated
+ to allow (and ignore) @none
values.@container
in an expanded term definition
+ can also be an array containing any appropriate container
+ keyword along with @set
(other than @list
).
+ This allows a way to ensure that such entry values will always
+ be expressed in array form.@prefix
entry with the value true
. The 1.0 algorithm has
+ been updated to only consider terms that map to a value that ends with a URI
+ gen-delim character.@container
to include @graph
,
+ along with @id
, @index
and @set
.
+ In the Expansion Algorithm, this is
+ used to create a named graph from either a node object, or
+ objects which are values of entries in an id map or index map.
+ The Compaction Algorithm allows
+ specific forms of graph objects to be compacted back to a set of node objects,
+ or maps of node objects.@none
keyword, or an alias, for
+ values of maps for which there is no natural index. The Expansion Algorithm removes this indexing
+ transparently.