protected function encodeField($label, $value, array $context)
    {
        $convertedLabel = $this->convertEncoding($label, $context);
        $strict         = $context['strict'];

        if ($strict) {
            $this->assertLabel($convertedLabel);
        }

        if ($value === null) {
            $value = '';
        }

        if (is_object($value) && method_exists($value, '__toString')) {
            $value = "$value";
        }

        if (is_scalar($value)) {
            $convertedValue = $this->convertEncoding($value, $context);

            if ($strict) {
                $this->assertValue($convertedValue);
            }

            return sprintf('%s%s%s', $convertedLabel, static::DELIMITER, $convertedValue);
        }

        throw new \RuntimeException(sprintf('Could not serialize LTSV value of label:%s.', $label));
    }