github.com/kaptinlin/jsonschema@v0.4.6/testdata/JSON-Schema-Test-Suite/tests/draft2020-12/optional/format/relative-json-pointer.json (about) 1 [ 2 { 3 "description": "validation of Relative JSON Pointers (RJP)", 4 "schema": { 5 "$schema": "https://json-schema.org/draft/2020-12/schema", 6 "format": "relative-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 upwards RJP", 41 "data": "1", 42 "valid": true 43 }, 44 { 45 "description": "a valid downwards RJP", 46 "data": "0/foo/bar", 47 "valid": true 48 }, 49 { 50 "description": "a valid up and then down RJP, with array index", 51 "data": "2/0/baz/1/zip", 52 "valid": true 53 }, 54 { 55 "description": "a valid RJP taking the member or index name", 56 "data": "0#", 57 "valid": true 58 }, 59 { 60 "description": "an invalid RJP that is a valid JSON Pointer", 61 "data": "/foo/bar", 62 "valid": false 63 }, 64 { 65 "description": "negative prefix", 66 "data": "-1/foo/bar", 67 "valid": false 68 }, 69 { 70 "description": "explicit positive prefix", 71 "data": "+1/foo/bar", 72 "valid": false 73 }, 74 { 75 "description": "## is not a valid json-pointer", 76 "data": "0##", 77 "valid": false 78 }, 79 { 80 "description": "zero cannot be followed by other digits, plus json-pointer", 81 "data": "01/a", 82 "valid": false 83 }, 84 { 85 "description": "zero cannot be followed by other digits, plus octothorpe", 86 "data": "01#", 87 "valid": false 88 }, 89 { 90 "description": "empty string", 91 "data": "", 92 "valid": false 93 }, 94 { 95 "description": "multi-digit integer prefix", 96 "data": "120/foo/bar", 97 "valid": true 98 } 99 ] 100 } 101 ]