-- schema.json --
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "definitions": {
    "ref": {
      "properties": {
        "branches": {
          "type": "object"
        },
        "branches-ignore": {
          "type": "object"
        }
      },
      "oneOf": [
        {
          "type": "object",
          "allOf": [
            {
              "not": {
                "type": "string"
              }
            }
          ]
        },
        {
          "type": "null"
        }
      ]
    }
  }
}


-- out/decode/extract --
@jsonschema(schema="http://json-schema.org/draft-07/schema#")

_

#ref: matchN(1, [matchN(0, [string]) & {
	...
}, null]) & (null | {
	branches?: {
		...
	}
	"branches-ignore"?: {
		...
	}
	...
})
