I am struggling with the following problem: I want to convert an OrderedDict like this:
OrderedDict
OrderedDict([(\'method\', \'constant\'), (\'data\', \'1.
If you are looking for a recursive version without using the json module:
json
def ordereddict_to_dict(value): for k, v in value.items(): if isinstance(v, dict): value[k] = ordereddict_to_dict(v) return dict(value)