Template-based (de-)serialization framework, take 1