persist template parameter data type during deserialization