MCPcopy
hub / github.com/MetapriseAI/OrgKernel / canonical_json

Function canonical_json

src/orgkernel/crypto_utils.py:167–172  ·  view source on GitHub ↗

Return deterministic JSON serialization of a dict. Keys are sorted, no extra whitespace, ASCII-safe.

(data: dict[str, Any])

Source from the content-addressed store, hash-verified

165
166
167def canonical_json(data: dict[str, Any]) -> str:
168 """
169 Return deterministic JSON serialization of a dict.
170 Keys are sorted, no extra whitespace, ASCII-safe.
171 """
172 return json.dumps(data, separators=(",", ":"), sort_keys=True, ensure_ascii=False)
173
174
175# ── Agent Certificate Signing ──────────────────────────────────────────────────

Callers 2

sign_agent_certificateFunction · 0.85
sign_token_payloadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected