예제 #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)
예제 #2
0
파일: svc.py 프로젝트: mealy/splunk
    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