Skip to main content

Module jcs

Module jcs 

Source
Expand description

RFC 8785 JSON Canonicalization Scheme (JCS).

Ordinary serde_json::to_string and jq -S are not JCS. Public entry is raw JSON / bytes through a duplicate-aware parser. A Value may be encoded only after that parser has guaranteed uniqueness.

Enums§

JcsError
Canonicalization failure.

Functions§

canonicalize_bytes
Parse UTF-8 JSON bytes with I-JSON / RFC 8785 constraints, then canonicalize.
canonicalize_json
Parse JSON with I-JSON / RFC 8785 constraints, then canonicalize.
parse_strict
Parse JSON, rejecting duplicate keys, lone surrogates, non-finite numbers, and integers outside the I-JSON binary64 domain.