Adding serializer/deserializer for common types.