News for hackers. Stuff that matters.
Re:When Not to Serialize by ninkendo on Friday August 10, 2018 @11:29PM (#17738137)
IMO the serializers should be their own standalone classes/modules which live separately from your application’s core types. You can invoke them when you need to do the serialization and keep parallel versions of them for legacy clients, etc.

ActiveModel::Serializers work like this in Rails, although I haven’t tried any similar approaches in statically-typed languages where protobuf is so commonly used.

Re:When Not to Serialize by aldarn on Saturday August 11, 2018 @01:31AM (#17738516)
For Python there's Marshmallow (https://github.com/marshmallow-code/marshmallow) and Django REST Framework if you're using Django (http://www.django-rest-framework.org/api-guide/serializers/). Both of these work as you described.
Re:When Not to Serialize by SamReidHughes on Saturday August 11, 2018 @10:14PM (#17742590)
Serializers are just functions. Why do they need to be classes?