private function processStack(\Iterator $iterator, $isObject)
    {
        if ($isObject) {
            if (!$this->processKey($iterator->key())) {
                return;
            }
        } elseif (!$this->first) {
            $this->outputLine(',', JsonToken::T_COMMA);
        }

        $this->first = false;
        $this->processValue($iterator->current());
    }