Hi Spyne Users

I am currently using Spyne for SOAP communication but I would like to use the 
JSON protocol as well. And most likely JSONP since the cross-origin resource 
sharing mechanism (CORS) will (still) exclude a number of browsers and seems 
somewhat involved to implement. But I can see from the Spyne source code that 
JSONP support is currently not available in the JSON serializer 
(spyne.protocol.json).

So what I intend to do is: Subclass JsonDocument. Override __init__ to take an 
optional callback function (default=None => behaviour as JsonDocument) and 
override create_out_string so that it optionally (if callback function is not 
None) wraps the JSON output in:

callback_function_name + '(' + json + ')'

Since I am new to Spyne I wanted to hear whether this sounds like a reasonable 
approach?

Best regards,
Jesper
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to