Is there any way to specify a custom serialization function for one column by name? Like the serialize_types for custom type, something like
class CustomSerializerMixin(SerializerMixin):
additional_serialize_rule = (('column1', lambda x: x),)
edit: my current get around is this, but it would be nice if this step could be done during serialization and reduce the redundant logic
class CustomSerializerMixin(SerializerMixin):
def to_dict(self, *args, **kwargs):
obj_dict = super().to_dict(*args, **kwargs)
# ...custom logic to transform obj_dict
return obj_dict
Is there any way to specify a custom serialization function for one column by name? Like the
serialize_typesfor custom type, something likeedit: my current get around is this, but it would be nice if this step could be done during serialization and reduce the redundant logic