Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Commit e9fb5e5

Browse files
committed
Describe use of booleans as schema
1 parent 0de2636 commit e9fb5e5

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

source/basics.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,28 @@ completely valid schema that will accept any valid JSON.
2525
--
2626
{ "an": [ "arbitrarily", "nested" ], "data": "structure" }
2727

28+
|draft6|
29+
30+
You can also use ``true`` in place of the empty object to represent a schema
31+
that matches anything, or ``false`` for a schema that matches nothing.
32+
33+
.. schema_example::
34+
35+
true
36+
--
37+
// This accepts anything, as long as it's valid JSON
38+
42
39+
--
40+
"I'm a string"
41+
--
42+
{ "an": [ "arbitrarily", "nested" ], "data": "structure" }
43+
44+
.. schema_example::
45+
46+
false
47+
--X
48+
"Resistance is futile... This will always fail!!!"
49+
2850
The type keyword
2951
----------------
3052

0 commit comments

Comments
 (0)