pub fn validate(type_name: &str, json: &str) -> JsValueExpand description
Validate JSON data against a registered type.
§Arguments
type_name- The name of the type to validate against (e.g., “Booking”)json- JSON string to validate
§Returns
A ValidationResult object (always, never throws):
{ ok: true }- Validation passed{ ok: false, errors: [...] }- Validation failed{ ok: false, error: { code, message } }- System error