{
  "@context": "http://www.w3.org/ns/shex.jsonld",
  "type": "Schema",
  "shapes": [
    { "type": "ShapeDecl",
    "id": "http://a.example/#A",
    "shapeExpr": {
      "type": "Shape",
      "expression": {
        "type": "EachOf",
        "expressions": [
          {
            "type": "TripleConstraint",
            "predicate": "http://a.example/p",
            "min": 2,
            "max": 2
          },
          {
            "type": "TripleConstraint",
            "predicate": "http://a.example/q",
            "valueExpr": {
              "type": "NodeConstraint",
              "values": [
                {
                  "value": "3",
                  "type": "http://www.w3.org/2001/XMLSchema#integer"
                }
              ]
            }
          }
        ]
      }
    } },
    { "type": "ShapeDecl",
    "id": "http://a.example/#B",
    "shapeExpr": {
      "type": "ShapeAnd",
      "shapeExprs": [
        "http://a.example/#A",
        {
          "type": "Shape",
          "expression": {
            "type": "EachOf",
            "expressions": [
              {
                "type": "TripleConstraint",
                "predicate": "http://a.example/p",
                "min": 1,
                "max": 3
              },
              {
                "type": "TripleConstraint",
                "predicate": "http://a.example/q",
                "min": 1,
                "max": 3
              }
            ]
          }
        }
      ]
    } },
    { "type": "ShapeDecl",
    "id": "http://a.example/#C",
    "shapeExpr": {
      "type": "Shape",
      "extends": [
        "http://a.example/#B"
      ],
      "expression": {
        "type": "TripleConstraint",
        "predicate": "http://a.example/p"
      }
    } }
  ]
}
