protected function encode($content)
    {
        $jsonString = parent::encode($content);

        if ($this->hasValidCallback()) {
            return \sprintf('%s(%s);', $this->getCallback(), $jsonString);
        }

        return $jsonString;
    }