I am struggling with the following problem: I want to convert an OrderedDict like this:
OrderedDict
OrderedDict([(\'method\', \'constant\'), (\'data\', \'1.
Its simple way
>>import json >>from collection import OrderedDict >>json.dumps(dict(OrderedDict([('method', 'constant'), ('data', '1.225')])))