Debian Codegraph @

spec/JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/time.json

raw ◀ ▶
2 Debian patches touch this file
•1 [
2 {
3 "description": "validation of time strings",
4 "schema": { "format": "time" },
5 "tests": [
6 {
7 "description": "all string formats ignore integers",
8 "data": 12,
9 "valid": true
10 },
11 {
12 "description": "all string formats ignore floats",
13 "data": 13.7,
14 "valid": true
15 },
16 {
17 "description": "all string formats ignore objects",
18 "data": {},
19 "valid": true
20 },
21 {
22 "description": "all string formats ignore arrays",
23 "data": [],
24 "valid": true
25 },
26 {
27 "description": "all string formats ignore booleans",
28 "data": false,
29 "valid": true
30 },
31 {
32 "description": "all string formats ignore nulls",
33 "data": null,
34 "valid": true
35 },
36 {
37 "description": "a valid time string",
38 "data": "08:30:06Z",
39 "valid": true
40 },
41 {
42 "description": "a valid time string with leap second, Zulu",
43 "data": "23:59:60Z",
44 "valid": true
45 },
46 {
47 "description": "invalid leap second, Zulu (wrong hour)",
48 "data": "22:59:60Z",
49 "valid": false
50 },
51 {
52 "description": "invalid leap second, Zulu (wrong minute)",
53 "data": "23:58:60Z",
54 "valid": false
55 },
56 {
57 "description": "valid leap second, zero time-offset",
58 "data": "23:59:60+00:00",
59 "valid": true
60 },
61 {
62 "description": "invalid leap second, zero time-offset (wrong hour)",
63 "data": "22:59:60+00:00",
64 "valid": false
65 },
66 {
67 "description": "invalid leap second, zero time-offset (wrong minute)",
68 "data": "23:58:60+00:00",
69 "valid": false
70 },
71 {
72 "description": "a valid time string with second fraction",
73 "data": "23:20:50.52Z",
74 "valid": true
75 },
76 {
77 "description": "a valid time string with precise second fraction",
78 "data": "08:30:06.283185Z",
79 "valid": true
80 },
81 {
82 "description": "a valid time string with plus offset",
83 "data": "08:30:06+00:20",
84 "valid": true
85 },
86 {
87 "description": "a valid time string with minus offset",
88 "data": "08:30:06-08:00",
89 "valid": true
90 },
91 {
92 "description": "a valid time string with case-insensitive Z",
93 "data": "08:30:06z",
94 "valid": true
95 },
96 {
97 "description": "an invalid time string with invalid hour",
98 "data": "24:00:00Z",
99 "valid": false
100 },
101 {
102 "description": "an invalid time string with invalid minute",
103 "data": "00:60:00Z",
104 "valid": false
105 },
106 {
107 "description": "an invalid time string with invalid second",
108 "data": "00:00:61Z",
109 "valid": false
110 },
111 {
112 "description": "an invalid time string with invalid time with both Z and numoffset",
113 "data": "01:02:03Z+00:30",
114 "valid": false
115 },
116 {
117 "description": "an invalid offset indicator",
118 "data": "08:30:06 PST",
119 "valid": false
120 },
121 {
122 "description": "only RFC3339 not all of ISO 8601 are valid",
123 "data": "01:01:01,1111",
124 "valid": false
125 },
126 {
127 "description": "non-ascii digits should be rejected",
128 "data": "1২:00:00Z",
129 "valid": false
130 }
131 ]
132 }
133 ]