ShEx (Shape Expressions) is a language for describing and validating the structure of RDF graphs, specifying which properties a node must have, their cardinalities, and value constraints. It serves a role for linked data analogous to schemas for XML or JSON, enabling data producers and consumers to agree on graph shapes. It is widely used to validate Solid pods and Wikidata-style knowledge graphs.

Content

  • A ShEx schema defines shapes that nodes must conform to, supporting closed and open shapes, logical operators, and value-set constraints. Compared with SHACL it favours a compact grammar and a clear conformance semantics, making it well suited to data interchange contracts and decentralised storage validation.