Skip to main content

canonical_json_bytes

Function canonical_json_bytes 

Source
pub fn canonical_json_bytes(value: &Value) -> Vec<u8> 
Expand description

Serializes JSON deterministically by sorting object keys recursively.

The format intentionally stays within JSON rather than relying on Rust’s map iteration order. It is the hash preimage format for schema version 1.