Convenience: produce a JSON string directly.
String encodeCanonical(Map<String, dynamic> input) => jsonEncode(canonicalizeMap(input));