JSON Schema validation for vibe.d JSON
Json scheme = parseJsonString(`{
"type": "object",
"properties": {
"foo": {
"type": "integer",
"minimum": 0
},
"bar": {
"type": "string",
"maxLength": 255
}
}
}`);
Json json = parseJsonString(`{
"foo": 42,
"bar": "baz"
}`);
bool valid = validateJson(scheme, json);
assert(valid);
- definitions
- $ref