How should a JSON schema validator handle the case where a sub-object of an object has a default value but the parent object hasn't?
Imagine the following schema
{
"type": "object",
"properties": {
"element": {
"type": "object",
"properties": {
"number" : { "type": "integer", "default": 15 }
}
}
}
}
Validated against the following JSON: {}
it is resulting in {}
.
But shouldn't it result in
{
"element": {
"number": 15
}
}
.
How do we have to interpret the default
-keyword? I read the corresponding lines in the standard, but they haven't helped me further.