Expand description
Canonical JSON serialization (simplified RFC 8785).
We don’t implement the full RFC 8785 (which covers numeric edge cases);
instead we sort object keys deterministically and emit the same shape as
serde_json::to_vec. This is sufficient for hash-chain inputs where the
producer and verifier are both Rust processes.
Functions§
- canonical_
json - Serialize
valueas canonical JSON: object keys sorted lexicographically. - write_
canonical_ value - Write a
Valueas canonical JSON into aWrite.