Task/Serialization/SerializerTask.php
public function execute(ProcessState $state)
    {
        $options = $this->getOptions($state);
        $serializeData = $this->serializer->serialize(
            $state->getInput(),
            $options['format'],
            $options['context']
        );
        $state->setOutput($serializeData);
    }
public function execute(ProcessState $state)
    {
        $options = $this->getOptions($state);
        $serializeData = $this->serializer->serialize(
            $state->getInput(),
            $options['format'],
            $options['context']
        );
        $state->setOutput($serializeData);
    }
@param ProcessState $state

@throws \Symfony\Component\OptionsResolver\Exception\ExceptionInterface