Skip to main content

canonicalize_json

Function canonicalize_json 

Source
pub fn canonicalize_json(value: &Value) -> Result<String, JcsError>
Expand description

Canonicalize a JSON value according to RFC 8785 (JSON Canonicalization Scheme).

The output follows RFC 8785 for object member ordering and finite floating-point number formatting. Integer values that serde_json stores exactly as i64/u64 are emitted verbatim, including values outside the ES6 safe-integer range. Callers that require strict I-JSON interoperability should reject integers outside [-(2^53)+1, (2^53)-1] before calling this function.