Module Chatoyant_schema.ValueSource

Runtime values produced by schema parsing.

Schema validation accepts JSON values and returns typed errors. Later ergonomic layers can expose typed records/functors, but this value layer is the stable provider-facing representation.

Sourcetype error = {
  1. path : string;
  2. expected : string;
  3. received : t option;
  4. message : string;
}
Sourceval validate : Schema.field -> t -> (unit, error) result
Sourceval validate_object : (string * Schema.field) list -> t -> (unit, error) result
Sourceval error_to_string : error -> string