json-schema-validator/test/JSON-Schema-Test-Suite/tests/draft7/optional/format/relative-json-pointer.json
Patrick Boettcher 7beb40bc61 Complete rewrite of the validator - aiming a 2.0-release
Schema a now "parsed" into C++-validator-objects in a first
step and then validation takes place with these objects.

Errors are now handled via a user-provided error-handler
allowing the user to collect all errors at once or bail out
when a certain threshold is reached. Fixes #36 and #8.

One (sub-)schema can now be referenced with different URIs. Fixes #9

JSON schema draft 7 is now supported. Fixes #35
2018-12-27 16:59:19 +01:00

34 lines
986 B
JSON

[
{
"description": "validation of Relative JSON Pointers (RJP)",
"schema": {"format": "relative-json-pointer"},
"tests": [
{
"description": "a valid upwards RJP",
"data": "1",
"valid": true
},
{
"description": "a valid downwards RJP",
"data": "0/foo/bar",
"valid": true
},
{
"description": "a valid up and then down RJP, with array index",
"data": "2/0/baz/1/zip",
"valid": true
},
{
"description": "a valid RJP taking the member or index name",
"data": "0#",
"valid": true
},
{
"description": "an invalid RJP that is a valid JSON Pointer",
"data": "/foo/bar",
"valid": false
}
]
}
]