@@ -301,8 +301,7 @@ <h1>Introduction</h1>
301
301
network, in a single document.</li>
302
302
</ul>
303
303
304
- <p>
305
- JSON-LD is designed to be usable directly as JSON, with no knowledge of RDF
304
+ <p>JSON-LD is designed to be usable directly as JSON, with no knowledge of RDF
306
305
[[RDF11-CONCEPTS]]. It is also designed to be usable as RDF, if desired, for
307
306
use with other Linked Data technologies like SPARQL [[SPARQL11-OVERVIEW]]. Developers who
308
307
require any of the facilities listed above or need to serialize an RDF <a>Graph</a>
@@ -312,8 +311,7 @@ <h1>Introduction</h1>
312
311
to RDF are in section <a href="#relationship-to-rdf"></a>.
313
312
</p>
314
313
315
- <p>
316
- The syntax is designed to not disturb already
314
+ <p>The syntax is designed to not disturb already
317
315
deployed systems running on JSON, but provide a smooth upgrade path from
318
316
JSON to JSON-LD. Since the shape of such data varies wildly, JSON-LD
319
317
features mechanisms to reshape documents into a deterministic structure
@@ -436,7 +434,31 @@ <h2>Design Goals and Rationale</h2>
436
434
Complete details of how JSON-LD relates to RDF are in section
437
435
<a href="#relationship-to-rdf"></a>.</dd>
438
436
</dl>
439
- </section>
437
+ </section>
438
+
439
+ <section class="informative">
440
+ <h2>Processor Levels</h2>
441
+ <p>JSON-LD mostly uses the JSON syntax [[RFC8259]] along with
442
+ various micro-syntaxes based on XML Schema datatypes [[XMLSCHEMA11-2]].
443
+ However, it has become increasingly common to include JSON within
444
+ a <a data-cite="HTML/semantics-scripting.html#the-script-element">script element</a>
445
+ within an HTML document [[HTML]],
446
+ as described in <a href="#embedding-json-ld-in-html-documents" class="sectionRef"></a>.
447
+ As not all processors operate in an environment which can include HTML,
448
+ this specification describes various categories of JSON-LD processors.</p>
449
+
450
+ <p>A <dfn>pure JSON Processor</dfn> only requires the use of a
451
+ JSON processor and is restricted to processing documents retrieved
452
+ with a JSON content type (e.g., <code>application/ld+json</code> or other JSON type).</p>
453
+
454
+ <p>A <dfn>event-based JSON Processor</dfn> processes a stream of characters
455
+ expecting an event after each syntactic element is encountered.
456
+ Such processors are sensitive to the order of the members of <a>JSON objects</a>,
457
+ which can have a performance impact if the members of <a>JSON objects</a> are encountered in an unexpected order.</p>
458
+
459
+ <p>A <dfn>full Processor</dfn> is capable of JSON-LD embedded in HTML,
460
+ in addition to the capabilities of a <a>pure JSON Processor</a>.</p>
461
+ </section>
440
462
441
463
<section class="informative">
442
464
<h2>Data Model Overview</h2>
@@ -10080,6 +10102,8 @@ <h3>Graph Containers</h3>
10080
10102
10081
10103
<section class="changed"><h2>Embedding JSON-LD in HTML Documents</h2>
10082
10104
10105
+ <p class="note">This section describes features available to a <a>full Processor</a>.</p>
10106
+
10083
10107
<p>
10084
10108
JSON-LD content can be easily embedded in HTML [[HTML]] by placing
10085
10109
it in a <a data-cite="HTML/semantics-scripting.html#the-script-element">script element</a> with the <code>type</code> attribute set to
@@ -12533,7 +12557,8 @@ <h2>Changes since JSON-LD Community Group Final Report</h2>
12533
12557
Define the <code>rdf:JSON</code> datatype.</li>
12534
12558
<li><a>Term definitions</a> with keys which are of the form of a <a>compact IRI</a> or <a>absolute IRI</a> MUST NOT
12535
12559
expand to an <a>IRI</a> other than the expansion of the key itself.</li>
12536
- <li>If a retrieved context URL returns an HTML document, the first script element
12560
+ <li>Define different processor modes: <a>pure JSON Processor</a>, <a>event-based JSON processor</a>, and <a>full Processor</a>.</li>
12561
+ <li>For a <a>full Processor</a>, if a retrieved context URL returns an HTML document, the first script element
12537
12562
of type <code>application/ld+json;profile=http://www.w3.org/ns/json-ld#context</code>,
12538
12563
or <code>application/ld+json</code> is used as the context for further processing.
12539
12564
This allows a mechanism for documenting the content of a context using HTML.</li>
0 commit comments