title: Validating nested list of numbers/booleans with JSON schema
body: <p>I'm not sure if this is possible with JSON schema, but I have data similar to this:</p>
  
  <pre><code>[1, 1, [0, 0, [true]], true]
  </code></pre>
  
  <p>How can I validate [0, 0, 1] so that at least one of the items is 1/true?</p>
  
  <p>So far, I have managed to create schema to this point:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>{
    "type": "array",
    "items": {
      "$ref": "#/definitions/_items"
    },
    "definitions": {
      "_items": {
        "anyOf": [
          {
            "enum": [
              0,
              1
            ],
            "type": "integer"
          },
          {
            "enum": [
              false,
              true
            ],
            "type": "boolean"
          },
          {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "$ref": "#/definitions/_items"
                }
              ]
            }
          }
        ]
      }
    }
  }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Apparently it does validate all accepted values, but it doesn't take on account, if there are all, some, one, or none of the values 1 / true. I misunderstood, that anyOf, allOf and oneOf are reserved for that...</p>