Beispiel #1
0
    def render_odata(self, thing):
        '''
        Default outputter for odata wrapped response
        '''
        cherrypy.response.headers['Content-Type'] = 'application/json'

        output = ODataResponse()
        output.results = thing
        return json.dumps(output.to_json(), indent=2, sort_keys=True)
Beispiel #2
0
    def render_odata(self, thing):
        """
        Default outputter for odata wrapped response
        """
        cherrypy.response.headers["Content-Type"] = "application/json"

        output = ODataResponse()
        output.results = thing
        return json.dumps(output.to_json(), indent=2, sort_keys=True)
    def render_odata(self, thing):
        '''
        Default outputter for odata wrapped response
        '''
        # TODO
        #cherrypy.response.headers['Content-Type'] = 'application/json'

        output = ODataResponse()
        output.results = thing
        jsonOutput = json.dumps(output.to_json(), indent=2, sort_keys=True)        
        return jsonOutput