def getParams(self):
        """
        Check the schematic object to see if arguments from Tornado can be lists or dictionaries
        """
        types = [DictType, GeoPointType, ListType, ModelType]
        fieldkeys = self.fields.keys()

        j = JSONSerializer() 
        if 'q' in self.arguments:
            params = tornado.escape.to_unicode(self.arguments['q'][0])
            params = tornado.escape.json_decode(params)
            self.arguments = params
        else:
            for k,v in self.arguments.items():
                if type(v) is list and k in fieldkeys and self.fields[k] not in types:
                    self.arguments[k] = self.arguments[k][0].decode("utf-8")

        if len(self.args):
            self.arguments['_id'] = self.args[0]

        return self.arguments
dataset/ETHPy150Open tgonzales/mingus/mingus/resources.py/ModelParams.getParams/original