stashboard/handlers/restful.py
def json(self, data):
        """
        Renders the given data as json.
        If callback is valid, renders data as jsonp
        """
        callback = self.request.get('callback', default_value=False)

        data = json.dumps(data)

        if callback:
            self.response.headers['Content-Type'] = "application/javascript"
            data = callback + "(" + data + ");"
        else:
            self.response.headers['Content-Type'] = "application/json"

        self.response.out.write(data)

        Renders the given data as json.
        If callback is valid, renders data as jsonp
        
Renders the given data as json.
If callback is valid, renders data as jsonp
Renders the given data as json . If callback is valid renders data as jsonp
def json(self, data):
        callback = self.request.get('callback', default_value=False)
        data = json.dumps(data)
        if callback:
            self.response.headers['Content-Type'] = "application/javascript"
            data = callback + "(" + data + ");"
        else:
            self.response.headers['Content-Type'] = "application/json"
        self.response.out.write(data)
def json ( self , data ) : callback = self . request . get ( 'callback' , default_value = False ) data = json . dumps ( data ) if callback : self . response . headers [ 'Content-Type' ] = "application/javascript" data = callback + "(" + data + ");" else : self . response . headers [ 'Content-Type' ] = "application/json" self . response . out . write ( data )
Renders the given data as json.
Renders the given data as json .
"""
        Renders the given data as json.
        If callback is valid, renders data as jsonp
        """
self
data