summaryrefslogtreecommitdiff
path: root/tests/draft7/optional/format/iri.json
blob: a0d12aed645698bc651550f0fe23429636b27c45 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
[
    {
        "description": "validation of IRIs",
        "schema": { "format": "iri" },
        "tests": [
            {
                "description": "all string formats ignore integers",
                "data": 12,
                "valid": true
            },
            {
                "description": "all string formats ignore floats",
                "data": 13.7,
                "valid": true
            },
            {
                "description": "all string formats ignore objects",
                "data": {},
                "valid": true
            },
            {
                "description": "all string formats ignore arrays",
                "data": [],
                "valid": true
            },
            {
                "description": "all string formats ignore booleans",
                "data": false,
                "valid": true
            },
            {
                "description": "all string formats ignore nulls",
                "data": null,
                "valid": true
            },
            {
                "description": "a valid IRI with anchor tag",
                "data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx",
                "valid": true
            },
            {
                "description": "a valid IRI with anchor tag and parentheses",
                "data": "http://ƒøø.com/blah_(wîkïpédiå)_blah#ßité-1",
                "valid": true
            },
            {
                "description": "a valid IRI with URL-encoded stuff",
                "data": "http://ƒøø.ßår/?q=Test%20URL-encoded%20stuff",
                "valid": true
            },
            {
                "description": "a valid IRI with many special characters",
                "data": "http://-.~_!$&'()*+,;=:%40:80%2f::::::@example.com",
                "valid": true
            },
            {
                "description": "a valid IRI based on IPv6",
                "data": "http://[2001:0db8:85a3:0000:0000:8a2e:0370:7334]",
                "valid": true
            },
            {
                "description": "an invalid IRI based on IPv6",
                "data": "http://2001:0db8:85a3:0000:0000:8a2e:0370:7334",
                "valid": false
            },
            {
                "description": "an invalid relative IRI Reference",
                "data": "/abc",
                "valid": false
            },
            {
                "description": "an invalid IRI",
                "data": "\\\\WINDOWS\\filëßåré",
                "valid": false
            },
            {
                "description": "an invalid IRI though valid IRI reference",
                "data": "âππ",
                "valid": false
            }
        ]
    }
]