extract serializer from template