Skip to main content

serialized

Function serialized 

Source
pub fn serialized(v: &Value) -> Vec<u8> ⓘ
Expand description

The exact serialized form a digest or byte count describes (§3.2: content_bytes is the serialized length). Compact JSON — the same bytes serde_json::to_string produces everywhere else.

serde_json::to_vec over a Value cannot fail (a Value is by construction valid JSON: no non-string map keys, no non-finite floats), and an audit digest must never silently describe the empty input — so the invariant is asserted, the same convention subscriptions.rs uses, rather than defaulted.