github.com/kaptinlin/jsonschema@v0.4.6/testdata/JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/idn-hostname.json (about) 1 [ 2 { 3 "description": "validation of internationalized host names", 4 "schema": { 5 "$schema": "https://json-schema.org/draft/2019-09/schema", 6 "format": "idn-hostname" 7 }, 8 "tests": [ 9 { 10 "description": "all string formats ignore integers", 11 "data": 12, 12 "valid": true 13 }, 14 { 15 "description": "all string formats ignore floats", 16 "data": 13.7, 17 "valid": true 18 }, 19 { 20 "description": "all string formats ignore objects", 21 "data": {}, 22 "valid": true 23 }, 24 { 25 "description": "all string formats ignore arrays", 26 "data": [], 27 "valid": true 28 }, 29 { 30 "description": "all string formats ignore booleans", 31 "data": false, 32 "valid": true 33 }, 34 { 35 "description": "all string formats ignore nulls", 36 "data": null, 37 "valid": true 38 }, 39 { 40 "description": "a valid host name (example.test in Hangul)", 41 "data": "실례.테스트", 42 "valid": true 43 }, 44 { 45 "description": "illegal first char U+302E Hangul single dot tone mark", 46 "data": "〮실례.테스트", 47 "valid": false 48 }, 49 { 50 "description": "contains illegal char U+302E Hangul single dot tone mark", 51 "data": "실〮례.테스트", 52 "valid": false 53 }, 54 { 55 "description": "a host name with a component too long", 56 "data": "실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실실례례테스트례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례례례례례례례례테스트례례례례례례례례례례례례테스트례례실례.테스트", 57 "valid": false 58 }, 59 { 60 "description": "invalid label, correct Punycode", 61 "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc3492#section-7.1", 62 "data": "-> $1.00 <--", 63 "valid": false 64 }, 65 { 66 "description": "valid Chinese Punycode", 67 "comment": "https://tools.ietf.org/html/rfc5890#section-2.3.2.1 https://tools.ietf.org/html/rfc5891#section-4.4", 68 "data": "xn--ihqwcrb4cv8a8dqg056pqjye", 69 "valid": true 70 }, 71 { 72 "description": "invalid Punycode", 73 "comment": "https://tools.ietf.org/html/rfc5891#section-4.4 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", 74 "data": "xn--X", 75 "valid": false 76 }, 77 { 78 "description": "U-label contains \"--\" in the 3rd and 4th position", 79 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1 https://tools.ietf.org/html/rfc5890#section-2.3.2.1", 80 "data": "XN--aa---o47jg78q", 81 "valid": false 82 }, 83 { 84 "description": "U-label starts with a dash", 85 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", 86 "data": "-hello", 87 "valid": false 88 }, 89 { 90 "description": "U-label ends with a dash", 91 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", 92 "data": "hello-", 93 "valid": false 94 }, 95 { 96 "description": "U-label starts and ends with a dash", 97 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.1", 98 "data": "-hello-", 99 "valid": false 100 }, 101 { 102 "description": "Begins with a Spacing Combining Mark", 103 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", 104 "data": "\u0903hello", 105 "valid": false 106 }, 107 { 108 "description": "Begins with a Nonspacing Mark", 109 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", 110 "data": "\u0300hello", 111 "valid": false 112 }, 113 { 114 "description": "Begins with an Enclosing Mark", 115 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.2", 116 "data": "\u0488hello", 117 "valid": false 118 }, 119 { 120 "description": "Exceptions that are PVALID, left-to-right chars", 121 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", 122 "data": "\u00df\u03c2\u0f0b\u3007", 123 "valid": true 124 }, 125 { 126 "description": "Exceptions that are PVALID, right-to-left chars", 127 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", 128 "data": "\u06fd\u06fe", 129 "valid": true 130 }, 131 { 132 "description": "Exceptions that are DISALLOWED, right-to-left chars", 133 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6", 134 "data": "\u0640\u07fa", 135 "valid": false 136 }, 137 { 138 "description": "Exceptions that are DISALLOWED, left-to-right chars", 139 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.2 https://tools.ietf.org/html/rfc5892#section-2.6 Note: The two combining marks (U+302E and U+302F) are in the middle and not at the start", 140 "data": "\u3031\u3032\u3033\u3034\u3035\u302e\u302f\u303b", 141 "valid": false 142 }, 143 { 144 "description": "MIDDLE DOT with no preceding 'l'", 145 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 146 "data": "a\u00b7l", 147 "valid": false 148 }, 149 { 150 "description": "MIDDLE DOT with nothing preceding", 151 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 152 "data": "\u00b7l", 153 "valid": false 154 }, 155 { 156 "description": "MIDDLE DOT with no following 'l'", 157 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 158 "data": "l\u00b7a", 159 "valid": false 160 }, 161 { 162 "description": "MIDDLE DOT with nothing following", 163 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 164 "data": "l\u00b7", 165 "valid": false 166 }, 167 { 168 "description": "MIDDLE DOT with surrounding 'l's", 169 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.3", 170 "data": "l\u00b7l", 171 "valid": true 172 }, 173 { 174 "description": "Greek KERAIA not followed by Greek", 175 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", 176 "data": "\u03b1\u0375S", 177 "valid": false 178 }, 179 { 180 "description": "Greek KERAIA not followed by anything", 181 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", 182 "data": "\u03b1\u0375", 183 "valid": false 184 }, 185 { 186 "description": "Greek KERAIA followed by Greek", 187 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.4", 188 "data": "\u03b1\u0375\u03b2", 189 "valid": true 190 }, 191 { 192 "description": "Hebrew GERESH not preceded by Hebrew", 193 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", 194 "data": "A\u05f3\u05d1", 195 "valid": false 196 }, 197 { 198 "description": "Hebrew GERESH not preceded by anything", 199 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", 200 "data": "\u05f3\u05d1", 201 "valid": false 202 }, 203 { 204 "description": "Hebrew GERESH preceded by Hebrew", 205 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.5", 206 "data": "\u05d0\u05f3\u05d1", 207 "valid": true 208 }, 209 { 210 "description": "Hebrew GERSHAYIM not preceded by Hebrew", 211 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", 212 "data": "A\u05f4\u05d1", 213 "valid": false 214 }, 215 { 216 "description": "Hebrew GERSHAYIM not preceded by anything", 217 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", 218 "data": "\u05f4\u05d1", 219 "valid": false 220 }, 221 { 222 "description": "Hebrew GERSHAYIM preceded by Hebrew", 223 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.6", 224 "data": "\u05d0\u05f4\u05d1", 225 "valid": true 226 }, 227 { 228 "description": "KATAKANA MIDDLE DOT with no Hiragana, Katakana, or Han", 229 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 230 "data": "def\u30fbabc", 231 "valid": false 232 }, 233 { 234 "description": "KATAKANA MIDDLE DOT with no other characters", 235 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 236 "data": "\u30fb", 237 "valid": false 238 }, 239 { 240 "description": "KATAKANA MIDDLE DOT with Hiragana", 241 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 242 "data": "\u30fb\u3041", 243 "valid": true 244 }, 245 { 246 "description": "KATAKANA MIDDLE DOT with Katakana", 247 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 248 "data": "\u30fb\u30a1", 249 "valid": true 250 }, 251 { 252 "description": "KATAKANA MIDDLE DOT with Han", 253 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.7", 254 "data": "\u30fb\u4e08", 255 "valid": true 256 }, 257 { 258 "description": "Arabic-Indic digits mixed with Extended Arabic-Indic digits", 259 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", 260 "data": "\u0660\u06f0", 261 "valid": false 262 }, 263 { 264 "description": "Arabic-Indic digits not mixed with Extended Arabic-Indic digits", 265 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.8", 266 "data": "\u0628\u0660\u0628", 267 "valid": true 268 }, 269 { 270 "description": "Extended Arabic-Indic digits not mixed with Arabic-Indic digits", 271 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.9", 272 "data": "\u06f00", 273 "valid": true 274 }, 275 { 276 "description": "ZERO WIDTH JOINER not preceded by Virama", 277 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", 278 "data": "\u0915\u200d\u0937", 279 "valid": false 280 }, 281 { 282 "description": "ZERO WIDTH JOINER not preceded by anything", 283 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", 284 "data": "\u200d\u0937", 285 "valid": false 286 }, 287 { 288 "description": "ZERO WIDTH JOINER preceded by Virama", 289 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.2 https://www.unicode.org/review/pr-37.pdf", 290 "data": "\u0915\u094d\u200d\u0937", 291 "valid": true 292 }, 293 { 294 "description": "ZERO WIDTH NON-JOINER preceded by Virama", 295 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1", 296 "data": "\u0915\u094d\u200c\u0937", 297 "valid": true 298 }, 299 { 300 "description": "ZERO WIDTH NON-JOINER not preceded by Virama but matches regexp", 301 "comment": "https://tools.ietf.org/html/rfc5891#section-4.2.3.3 https://tools.ietf.org/html/rfc5892#appendix-A.1 https://www.w3.org/TR/alreq/#h_disjoining_enforcement", 302 "data": "\u0628\u064a\u200c\u0628\u064a", 303 "valid": true 304 }, 305 { 306 "description": "single label", 307 "data": "hostname", 308 "valid": true 309 }, 310 { 311 "description": "single label with hyphen", 312 "data": "host-name", 313 "valid": true 314 }, 315 { 316 "description": "single label with digits", 317 "data": "h0stn4me", 318 "valid": true 319 }, 320 { 321 "description": "single label starting with digit", 322 "data": "1host", 323 "valid": true 324 }, 325 { 326 "description": "single label ending with digit", 327 "data": "hostnam3", 328 "valid": true 329 } 330 ] 331 } 332 ]