pub fn validate(
value: &Value,
ty: &str,
types: &BTreeMap<String, RecordType>,
) -> Result<(), String>Expand description
Check a value against an Ingot type. Returns the first mismatch found.
Deliberately shallow-but-strict rather than a general JSON Schema validator: it only has to cover the types Ingot can express, and it produces messages naming the Ingot type rather than a schema path.