Skip to content

Schema

  • schema Creates a schema token that parses a JSON object field-by-field using the provided descriptor map.
  • model Creates an extendable schema token for naming and authoring model classes.
  • str String primitive with optional chainable length and pattern constraints.
  • int Integer primitive.
  • SchemaToken Represents a type T that can be parsed from JSON input.
  • compileSerializer Compiles a fast JSON serializer from a schema token.
  • toJsonSchema Converts a schema token into a JSON Schema Draft 7 object.
  • array Creates a primitive that splits a comma-separated string (or maps over a pre-split string array) and parses each item using the provided primitive.
  • compileSerializer Compiles a fast JSON serializer from a schema token.
  • defaultTo Wraps a primitive so that missing or empty-string inputs produce fallback instead.
  • enums Creates a primitive that accepts any string value present in the provided tuple.
  • model Creates an extendable schema token for naming and authoring model classes.
  • optional Wraps a primitive to accept missing or empty-string inputs, mapping them to undefined.
  • schema Creates a schema token that parses a JSON object field-by-field using the provided descriptor map.
  • toJsonSchema Converts a schema token into a JSON Schema Draft 7 object.
  • ArrayTypedPrimitive Array-accepting primitive parser that splits a comma-separated string or maps over an existing string array.
  • DescriptorValue Accepted value types for a single field within a schema descriptor.
  • FieldError Single field-level parse error reported by SchemaToken.safeParse.
  • JsonObject JSON object with string keys and JsonValue values.
  • JsonSchema The JSON Schema fragment shape toJsonSchema produces.
  • JsonValue Any value that can appear in a JSON payload.
  • OpaqueSchemaToken Runtime token representing a schema, with its value type erased.
  • Primitive Opaque reference to a primitive parser.
  • PrimitiveJsonSchema JSON Schema fragment describing the constraints of a single primitive.
  • SafeParseResult Result of a schema parse operation.
  • SchemaError Collection of field-level errors produced by a failed schema parse.
  • SchemaSerializer A compiled function serializing a JSON value that matches its source schema token.
  • SchemaToken Represents a type T that can be parsed from JSON input.
  • TypedPrimitive Carries the output type alongside the primitive parser.
  • bool Boolean primitive.
  • date
  • email Email address primitive.
  • float Floating-point number primitive with optional chainable range constraints.
  • int Integer primitive.
  • str String primitive with optional chainable length and pattern constraints.
  • text Text primitive with optional chainable length and pattern constraints.
  • url URL primitive.
  • uuid UUID v4 primitive.

Last updated: