Search code examples
cherrypy

How to return jsonp in cherrypy?


How to return jsonp with cherrypy? I am currently using the following to return json:

class Root(object):
   @cherrypy.expose
   @tools.json_out
   def index(self):
      return {'key':'value'}

Is there some annotation for jsonp?


Solution

  • Check out this implementation...

    jsonp

    Hope this helps,

    Andrew