Skip to content

canonicalizeJSON

canonicalizeJSON(json) → string · JSON

Alias for jcs(). Produces deterministic JSON using RFC 8785.

  • json (required): JSON UDM value to canonicalize
bash
echo '{"z": 3, "a": 1, "m": 2}' | utlx -e 'canonicalizeJSON($input)'
# {"a":1,"m":2,"z":3}  (keys sorted, no whitespace)

Released under AGPL-3.0.