Answers for "api xml response to json python"

1

api xml response to json python

import xmltodict, json

o = xmltodict.parse('<e> <a>text</a> <a>text</a> </e>')
json.dumps(o) # '{"e": {"a": ["text", "text"]}}'
Posted by: Guest on June-22-2021

Browse Popular Code Answers by Language