json-schema-validator/test/JSON-Schema-Test-Suite/tests/draft7/optional/format/iri.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

54 lines
1.8 KiB
JSON

[
{
"description": "validation of IRIs",
"schema": {"format": "iri"},
"tests": [
{
"description": "a valid IRI with anchor tag",
"data": "http://ƒøø.ßår/?∂éœ=πîx#πîüx",
"valid": true
},
{
"description": "a valid IRI with anchor tag and parantheses",
"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
}
]
}
]