UTF-8 byte length of a value's JSON form, used as the envelope size.
Values JSON cannot represent (cycles, BigInt) measure as 0 rather than
throwing: the guard must never crash on applet input, and an unmeasurable
envelope is still subject to every other check.
Parameters
value: unknown
Any value, typically the raw envelope received from an applet.
Returns number
Byte length, or 0 when the value cannot be serialised.
UTF-8 byte length of a value's JSON form, used as the envelope
size.Values JSON cannot represent (cycles, BigInt) measure as 0 rather than throwing: the guard must never crash on applet input, and an unmeasurable envelope is still subject to every other check.