From a02c75aa086d1b34958347e8c98249a8386be11f Mon Sep 17 00:00:00 2001 From: Alexey Shchepin Date: Fri, 15 Aug 2025 04:45:08 +0300 Subject: [PATCH] Add support for null values in is_canonical_json (thanks to snoopcatt) (#4421) --- src/mod_matrix_gw.erl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mod_matrix_gw.erl b/src/mod_matrix_gw.erl index baafd64dc..5f9705422 100644 --- a/src/mod_matrix_gw.erl +++ b/src/mod_matrix_gw.erl @@ -744,6 +744,8 @@ is_canonical_json(B) when is_binary(B) -> true; is_canonical_json(B) when is_boolean(B) -> true; +is_canonical_json(null) -> + true; is_canonical_json(Map) when is_map(Map) -> maps:fold( fun(_K, V, true) ->