private function output($string, $token)
    {
        if ($this->newLine && $this->options & JSON_PRETTY_PRINT) {
            $indent = str_repeat($this->indent, count($this->stack));
            $this->write("\n", JsonToken::T_WHITESPACE);

            if ($indent !== '') {
                $this->write($indent, JsonToken::T_WHITESPACE);
            }

            $this->line++;
            $this->column = strlen($indent) + 1;
        }

        $this->newLine = false;
        $this->write($string, $token);
        $this->column += strlen($string);
    }