Ejemplo n.º 1
0
    def to_json(self, includes=None, excludes=None):
        if includes is None:
            includes = []
        if excludes is None:
            excludes = []
        self.__before_serialize__()
        excludes = excludes + self.DATE_FIELDS + self.NON_EXPORTABLE + self.DEFAULT_DATE_FIELDS
        includes = includes + self.EXPORTABLE
        result = entity_to_dict(self, includes, excludes)
        result = self.__convert_types__(result)
        result = self.__clean_json__(result)

        return result
Ejemplo n.º 2
0
 def to_dict(self):
     result = entity_to_dict(self)
     return result