{
    "type": [
        "integer",
        "string"
    ],
    "if": {
        "type": "integer"
    },
    "then": {
        "type": "integer",
        "maximum": 9999,
        "minimum": 0
    },
    "else": {
        "type": "string",
        "maxLength": 4,
        "minLength": 1,
        "pattern": "\\d+"
    }
}
# - # - # - #
type: [integer, string]
if: {type: integer}
then: {type: integer, maximum: 9999, minimum: 0}
else: {type: string, max length: 4, min length: 1, pattern: '\\d+'}
