xmltodict - Allow both OrderedDicts and normal dicts (#5111)

This commit is contained in:
Bert Blommers 2022-05-08 22:01:32 +00:00 committed by GitHub
parent 86d617e034
commit 551df91ddf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1018,7 +1018,7 @@ def xml_to_json_response(service_spec, operation, xml, result_node=None):
od[k] = [transform(v["member"], spec[k]["member"])]
elif isinstance(v["member"], list):
od[k] = [transform(o, spec[k]["member"]) for o in v["member"]]
elif isinstance(v["member"], OrderedDict):
elif isinstance(v["member"], (OrderedDict, dict)):
od[k] = [transform(v["member"], spec[k]["member"])]
else:
raise ValueError("Malformatted input")