Internal deterministic encoder for frozen Kernel metadata and hashes.
Ordinary maps require binary UTF-8 keys or valid public symbol-reference
wrappers and are recursively sorted by their normalized key bytes.
{:object, pairs} accepts the same key types, preserves an explicit key
order for versioned projections, and rejects duplicate normalized keys
before a map could erase them. Symbol-reference values are likewise encoded
as their display strings. Arrays retain their input order and output contains
no insignificant whitespace.
Summary
Types
Functions
@spec encode(term() | ordered_object()) :: {:ok, binary()} | {:error, :invalid_json | :duplicate_key}