mirror of
https://github.com/tristanpenman/valijson.git
synced 2025-01-10 03:33:08 +01:00
4c9864de73
This commit contains the third major design of a C++ library for JSON Schema validation. It is definitely not what I would consider production-ready, but I do think that the overall design of the library is robust.
29 lines
696 B
JSON
Executable File
29 lines
696 B
JSON
Executable File
[
|
|
{
|
|
"description": "minLength validation",
|
|
"schema": {"minLength": 2},
|
|
"tests": [
|
|
{
|
|
"description": "longer is valid",
|
|
"data": "foo",
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "exact length is valid",
|
|
"data": "fo",
|
|
"valid": true
|
|
},
|
|
{
|
|
"description": "too short is invalid",
|
|
"data": "f",
|
|
"valid": false
|
|
},
|
|
{
|
|
"description": "ignores non-strings",
|
|
"data": 1,
|
|
"valid": true
|
|
}
|
|
]
|
|
}
|
|
]
|