Skip to content

Commit 3550ca7

Browse files
clarify optional tests and document integer example
1 parent d69537a commit 3550ca7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ There is currently only one additional subdirectory that may exist within each s
8383

8484
This is:
8585

86-
1. `optional/`: Contains tests that are considered optional.
86+
1. `optional/`: Optional tests cover behavior that depends on implementation capabilities, such as language or runtime limitations, optional specification features, or representational constraints. Implementations should run these tests only if the relevant feature or distinction exists.
87+
For example, the test asserting that `1.0` is not an integer is optional because some languages (e.g. JavaScript) cannot distinguish between integers and floating-point numbers.
88+
Failing optional tests does not imply non-compliance with the JSON Schema specification.
8789

8890
Note, the `optional/` subdirectory today conflates many reasons why a test may be optional -- it may be because tests within a particular file are indeed not required by the specification but still potentially useful to an implementer, or it may be because tests within it only apply to programming languages with particular functionality (in
8991
which case they are not truly optional in such a language).

0 commit comments

Comments
 (0)