Skip to content

Commit 213d514

Browse files
committed
Use cases: Update paragraph about structural validation
1 parent 7c08951 commit 213d514

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

jsonschema-use-cases.xml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
<?xml version="1.0" encoding="US-ASCII"?>
22
<!DOCTYPE rfc [
3-
<!ENTITY RFC2119 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
43
<!ENTITY RFC3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml">
54
<!ENTITY RFC3987 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3987.xml">
5+
<!ENTITY RFC5234 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5234.xml">
66
<!ENTITY RFC6906 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.6906.xml">
7-
<!ENTITY RFC8259 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.8259.xml">
87
]>
98
<?rfc toc="yes"?>
109
<?rfc symrefs="yes"?>
@@ -24,7 +23,7 @@
2423
</address>
2524
</author>
2625

27-
<date year="2022"/>
26+
<date year="2023"/>
2827
<workgroup>JSON Schema</workgroup>
2928
<keyword>JSON</keyword>
3029
<keyword>Schema</keyword>
@@ -76,10 +75,13 @@
7675
<section title="Use Cases">
7776
<section title="Structural validation" anchor="uc-structural">
7877
<t>
79-
The most basic function of validating JSON is the ability to express any subset of JSON that can be described by a deterministic context-free grammar, except for distinguishing between different encodings of the same value. Schemas that limit themselves to this functionality may be compiled to a deterministic pushdown automata.
78+
Structural validation allows specifications to use JSON Schema to define a protocol where all equivalent encodings of a value will validate the same, as opposed to generic formal grammars that cannot provide this guarantee. A validator language that supports structural validation can entirely replace generic grammars such as <xref target="RFC5234">ABNF</xref>.
8079
</t>
8180
<t>
82-
The following features of JSON are easily expressible as a pushdown automata:
81+
Structural validation is a type of "context-free" validation: validation that can be performed with a finite amount of states or a stack of them, which do not distinguish between different encodings of the same value (the "structure"), but at each step, only uses the current state, without reading from other parts of the document (the "context"). Schemas that limit themselves to structural validation keywords can be implemented as a deterministic pushdown automata, and guaranteed to return a result in proportional time.
82+
</t>
83+
<t>
84+
The following features of JSON are part of structural validation:
8385
</t>
8486
<list>
8587
<t>JSON primitive type (string, object, etc)</t>
@@ -286,8 +288,8 @@
286288
<back>
287289
<!-- References Section -->
288290
<references title="Informative References">
291+
&RFC5234;
289292
&RFC6906;
290-
&RFC8259;
291293
</references>
292294

293295
</back>

0 commit comments

Comments
 (0)