github.com/kaptinlin/jsonschema@v0.4.6/testdata/JSON-Schema-Test-Suite/tests/draft2019-09/optional/format/json-pointer.json (about) 1 [ 2 { 3 "description": "validation of JSON-pointers (JSON String Representation)", 4 "schema": { 5 "$schema": "https://json-schema.org/draft/2019-09/schema", 6 "format": "json-pointer" 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 JSON-pointer", 41 "data": "/foo/bar~0/baz~1/%a", 42 "valid": true 43 }, 44 { 45 "description": "not a valid JSON-pointer (~ not escaped)", 46 "data": "/foo/bar~", 47 "valid": false 48 }, 49 { 50 "description": "valid JSON-pointer with empty segment", 51 "data": "/foo//bar", 52 "valid": true 53 }, 54 { 55 "description": "valid JSON-pointer with the last empty segment", 56 "data": "/foo/bar/", 57 "valid": true 58 }, 59 { 60 "description": "valid JSON-pointer as stated in RFC 6901 #1", 61 "data": "", 62 "valid": true 63 }, 64 { 65 "description": "valid JSON-pointer as stated in RFC 6901 #2", 66 "data": "/foo", 67 "valid": true 68 }, 69 { 70 "description": "valid JSON-pointer as stated in RFC 6901 #3", 71 "data": "/foo/0", 72 "valid": true 73 }, 74 { 75 "description": "valid JSON-pointer as stated in RFC 6901 #4", 76 "data": "/", 77 "valid": true 78 }, 79 { 80 "description": "valid JSON-pointer as stated in RFC 6901 #5", 81 "data": "/a~1b", 82 "valid": true 83 }, 84 { 85 "description": "valid JSON-pointer as stated in RFC 6901 #6", 86 "data": "/c%d", 87 "valid": true 88 }, 89 { 90 "description": "valid JSON-pointer as stated in RFC 6901 #7", 91 "data": "/e^f", 92 "valid": true 93 }, 94 { 95 "description": "valid JSON-pointer as stated in RFC 6901 #8", 96 "data": "/g|h", 97 "valid": true 98 }, 99 { 100 "description": "valid JSON-pointer as stated in RFC 6901 #9", 101 "data": "/i\\j", 102 "valid": true 103 }, 104 { 105 "description": "valid JSON-pointer as stated in RFC 6901 #10", 106 "data": "/k\"l", 107 "valid": true 108 }, 109 { 110 "description": "valid JSON-pointer as stated in RFC 6901 #11", 111 "data": "/ ", 112 "valid": true 113 }, 114 { 115 "description": "valid JSON-pointer as stated in RFC 6901 #12", 116 "data": "/m~0n", 117 "valid": true 118 }, 119 { 120 "description": "valid JSON-pointer used adding to the last array position", 121 "data": "/foo/-", 122 "valid": true 123 }, 124 { 125 "description": "valid JSON-pointer (- used as object member name)", 126 "data": "/foo/-/bar", 127 "valid": true 128 }, 129 { 130 "description": "valid JSON-pointer (multiple escaped characters)", 131 "data": "/~1~0~0~1~1", 132 "valid": true 133 }, 134 { 135 "description": "valid JSON-pointer (escaped with fraction part) #1", 136 "data": "/~1.1", 137 "valid": true 138 }, 139 { 140 "description": "valid JSON-pointer (escaped with fraction part) #2", 141 "data": "/~0.1", 142 "valid": true 143 }, 144 { 145 "description": "not a valid JSON-pointer (URI Fragment Identifier) #1", 146 "data": "#", 147 "valid": false 148 }, 149 { 150 "description": "not a valid JSON-pointer (URI Fragment Identifier) #2", 151 "data": "#/", 152 "valid": false 153 }, 154 { 155 "description": "not a valid JSON-pointer (URI Fragment Identifier) #3", 156 "data": "#a", 157 "valid": false 158 }, 159 { 160 "description": "not a valid JSON-pointer (some escaped, but not all) #1", 161 "data": "/~0~", 162 "valid": false 163 }, 164 { 165 "description": "not a valid JSON-pointer (some escaped, but not all) #2", 166 "data": "/~0/~", 167 "valid": false 168 }, 169 { 170 "description": "not a valid JSON-pointer (wrong escape character) #1", 171 "data": "/~2", 172 "valid": false 173 }, 174 { 175 "description": "not a valid JSON-pointer (wrong escape character) #2", 176 "data": "/~-1", 177 "valid": false 178 }, 179 { 180 "description": "not a valid JSON-pointer (multiple characters not escaped)", 181 "data": "/~~", 182 "valid": false 183 }, 184 { 185 "description": "not a valid JSON-pointer (isn't empty nor starts with /) #1", 186 "data": "a", 187 "valid": false 188 }, 189 { 190 "description": "not a valid JSON-pointer (isn't empty nor starts with /) #2", 191 "data": "0", 192 "valid": false 193 }, 194 { 195 "description": "not a valid JSON-pointer (isn't empty nor starts with /) #3", 196 "data": "a/a", 197 "valid": false 198 } 199 ] 200 } 201 ]