def _populateFromDb(self, data): for k in data: setattr(self, '_' + k, data[k]) self._stats = JSON.decode(self._stats) self._get = JSON.decode(self._get) self._post = JSON.decode(self._post) self._server = JSON.decode(self._server)
def _populateFromNodeJs(self, data): map = { 'name': 'group' } for k in data: value = data[k] if k in map: k = map[k] setattr(self, '_' + k, value) self._context = JSON.decode(self._context) self._extra = JSON.decode(self._extra)
def _makeSettingsDictionary(self, data): for r in data: value = r['value'] if self._isNumber(value): value = self._toNumber(value) if r['key'] == 'log_levels': value = JSON.decode(r['value']) setattr(self, r['key'], value)
def _populateFromNodeJs(self, data): for k in data: setattr(self, '_' + k, data[k]) self._stats = JSON.decode(self._stats)
def jloads(json_string): return JSON.decode(json_string)
def _populateFromDb(self, data): for k in data: setattr(self, '_' + k, data[k]) self._context = JSON.decode(self._context) self._extra = JSON.decode(self._extra)