Skip to main content

canonicalize_jsonb

Function canonicalize_jsonb 

Source
pub fn canonicalize_jsonb(src: &str) -> Result<String, ParseError>
Expand description

Canonicalise a jsonb text value the way PostgreSQL does on input: object keys sorted by (length, then bytewise) with duplicate keys collapsed last-wins, , / : whitespace, and numbers normalised to plain decimal (exponents expanded, -00, but trailing zeros from the input scale preserved — 1e2100, 1E-30.001, 1.10 stays 1.10). json keeps its input verbatim; only jsonb runs through this.