From 391439e97c1d311fbabe86edb8657d179b69d4be Mon Sep 17 00:00:00 2001 From: Fabio Caccamo Date: Sun, 28 May 2023 11:29:57 +0200 Subject: [PATCH] Encode in json only dicts. --- benedict/serializers/ini.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benedict/serializers/ini.py b/benedict/serializers/ini.py index 5b7fc41..e8de302 100644 --- a/benedict/serializers/ini.py +++ b/benedict/serializers/ini.py @@ -71,7 +71,7 @@ class INISerializer(AbstractSerializer): section = key parser.add_section(section) for option_key, option_value in value.items(): - if type_util.is_collection(option_value): + if type_util.is_dict(option_value): parser.set(section, option_key, self._json.encode(option_value)) else: parser.set(section, option_key, option_value)