

def _to_data(self):

    def getval(fld):
        val = getattr(self, fld.name, _NO_VAL)
        if (val is _NO_VAL):
            val = fld.get_default_val()
        return val
    now = now_field()
    setattr(data, '_last_update', now)
    if (not getattr(self, '_create_date', '')):
        setattr(self, '_create_date', now)
    data = dict([(fld.name, getval(fld)) for fld in self.__fields__])
    return json.dumps(data)

dataset/ETHPy150Open memphis-iis/GLUDB/gludb/simple.py _to_data/VarMisuse@62/77 `self`->`data`