OK, so let's build this up by parts.
First, a single entry in the grid, either an empty string or an integer.
{
"oneOf": [
{
"enum": [""]
},
{
"type": "integer",
"minimum": 0,
"maximum": 99
}
]
}
Next, let's define a single row - this can be empty, or exactly 13 items long:
{
"type": "array",
"items": {"$ref": "#/definitions/gridCell"},
"oneOf": [
{"enum": [[]]}, // Alternatively: {"maxItems": 0}
{"minItems": 13, "maxItems": 13}
]
}
Now, we just want an array of 16 of these:
{
"type": "array",
"items": {"$ref": "#/definitions/gridRow"},
"minItems": 16,
"maxItems": 16,
"definitions": {
"gridCell": { ... schema from step #1 ... },
"gridRow": { ... schema from step #2 ... }
}
}