Skip to content
Snippets Groups Projects
Commit e62bb201 authored by Donovan Preston's avatar Donovan Preston
Browse files

QAR-277 svn merge -r83278:83442...

parent c5523188
No related branches found
No related tags found
No related merge requests found
......@@ -842,16 +842,6 @@ try:
except:
print "Couldn't import mulib.stacked, not registering LLSD converters"
else:
def llsd_convert_json(llsd_stuff, request):
callback = request.get_header('callback')
if callback is not None:
## See Yahoo's ajax documentation for information about using this
## callback style of programming
## http://developer.yahoo.com/common/json.html#callbackparam
req.write("%s(%s)" % (callback, simplejson.dumps(llsd_stuff)))
else:
req.write(simplejson.dumps(llsd_stuff))
def llsd_convert_xml(llsd_stuff, request):
request.write(format_xml(llsd_stuff))
......@@ -859,8 +849,6 @@ else:
request.write(format_binary(llsd_stuff))
for typ in [LLSD, dict, list, tuple, str, int, float, bool, unicode, type(None)]:
stacked.add_producer(typ, llsd_convert_json, 'application/json')
stacked.add_producer(typ, llsd_convert_xml, 'application/llsd+xml')
stacked.add_producer(typ, llsd_convert_xml, 'application/xml')
stacked.add_producer(typ, llsd_convert_xml, 'text/xml')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment