pub fn validate_wire_value(value: &Value) -> Result<()>Expand description
Checks the structural limit shared by the Rust and Python result protocol.
Value already guarantees string object keys, Unicode scalar strings and
finite signed/unsigned 64-bit or binary64 numbers. The Python helper checks
those properties before encoding so unsupported results cannot be coerced.
use ledgence_worker_api::validate_wire_value;
let output = serde_json::json!({"invoice_id": "INV-1042", "issued": true});
validate_wire_value(&output).unwrap();