begin generics-based serialization