JSON doesn’t map as nicely to XML as the ft data structure from fastcore.xml, but for simple XML trees it can be convenient. The json_to_xml function handles that conversion:
a =dict(surname='Howard', firstnames=['Jeremy','Peter'], address=dict(state='Queensland',country='Australia'))print(json_to_xml(a, 'person'))