Skip to content

Commit 39929d5

Browse files
committed
Added iterable support to .from_dict() method.
1 parent 5e49d13 commit 39929d5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

highcharts_core/metaclasses.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,10 @@ def from_json(cls,
235235

236236
as_dict = json.loads(as_str)
237237

238+
if checkers.is_iterable(as_dict, forbid_literals = (str, bytes, dict, UserDict)):
239+
return [cls.from_dict(x, allow_snake_case = allow_snake_case)
240+
for x in as_dict]
241+
238242
return cls.from_dict(as_dict,
239243
allow_snake_case = allow_snake_case)
240244

0 commit comments

Comments
 (0)