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