Can't figure out how to return a Python dict/Json as xml using Spyne
问题 I have fired up a WSGI application using Spyne for some SOAP services that I'm trying to build. I'm absolutely new to SOAP and Spyne in general and I can't seem to figure out how to return a JSON/Python dict as XML. This is what I've done. class Fruits(ServiceBase): @rpc(_returns=Iterable(Unicode)) def fruitify(self): fruits = {"apple" : "1", "orange" : ["2","3","4"]} return fruits I think the problem lies in the decorator I'm specifying using _returns . I tried reading the docs again and