Crate shape

Source

Structs§

  • The shape::Shape struct provides a recursive, immutable, reference-counted tree/DAG format for representing and enforcing common structures and usage patterns of JSON-like data.
  • The Shape::validate* methods return a vector of ShapeMismatch errors that is non-empty when validation fails.

Enums§

  • NamedShapePathKey represents a single step in a subpath associated with a ShapeCase::Name shape reference. When pretty-printed, these subpaths are delimited by . characters (with "..."-quoting as necessary for non-identifier field names), and can be either ::Field names or array ::Index values.
  • The ShapeCase enum attempts to capture all the common shapes of JSON values, not just the JSON types themselves, but also patterns of usage (such as using JSON arrays as either static tuples or dynamic lists).

Type Aliases§

  • A [start..end) range of byte offsets within some source document.