Skip to content

Commit a0c1e08

Browse files
committed
Add "const" keyword for constant values.
This addresses issue #58, which got quite a few upvotes and has a "draft 6" milestone. I used the shorter "const" that several people suggested rather than "constant", but obviously that's easy to change if the longer form is preferred. The wording was pretty much directly lifted from "enum".
1 parent b5afae7 commit a0c1e08

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

jsonschema-validation.xml

+10
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,16 @@
546546
</t>
547547
</section>
548548

549+
<section title="const">
550+
<t>
551+
The value of this keyword MAY be of any type, including null.
552+
</t>
553+
<t>
554+
An instance validates successfully against this keyword if its value is
555+
equal to the value of the keyword.
556+
</t>
557+
</section>
558+
549559
<section title="type">
550560
<t>
551561
The value of this keyword MUST be either a string or an array. If it is

0 commit comments

Comments
 (0)