2 ms·
i'm not sure about your particular issue, but every time i had to choose between being smart and generic with serialization over being straightforward and borin
by bsaul 10y ago
i'm not sure about your particular issue, but every time i had to choose between being smart and generic with serialization over being straightforward and boring ( at the cost of writing one small line of code for each and every property), i always choose to stay boring.
Not only is it nicer to the person that's going to maintain your code and may not know about your smart trick, but with generic code there is always an exception that makes you need to write some code somewhere that breaks the abstraction.
- maxxxxx 10y agoSame here. Generic serialization often breaks when there are some changes to the data and you have to be compatible with different versions.