Skip to content

Commit ccb8e04

Browse files
committed
Clarify that "length" applies to objects as well as arrays
1 parent bd68d1b commit ccb8e04

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jsonschema-validation.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,8 @@
419419
<xref target="json-schema">"contains"</xref> keyword. The first way is if
420420
the annotation result is an array and the length of that array is less than
421421
or equal to the "maxContains" value. The second way is if the annotation
422-
result is a boolean "true" and the instance length is less than or equal to
423-
the "maxContains" value.
422+
result is a boolean "true" and the instance length (number of items or
423+
properties) is less than or equal to the "maxContains" value.
424424
</t>
425425
</section>
426426

@@ -438,8 +438,8 @@
438438
<xref target="json-schema">"contains"</xref> keyword. The first way is if
439439
the annotation result is an array and the length of that array is greater
440440
than or equal to the "minContains" value. The second way is if the
441-
annotation result is a boolean "true" and the instance length is greater
442-
than or equal to the "minContains" value.
441+
annotation result is a boolean "true" and the instance length (number of
442+
items or properties) is greater than or equal to the "minContains" value.
443443
</t>
444444
<t>
445445
A value of 0 is allowed, but is only useful for setting a range

0 commit comments

Comments
 (0)