src/AbstractJsonEncoder.php
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());
    }
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());
    }
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 ( ) ) ; }
Handles the next value from the iterator to be encoded as JSON.
@param \Iterator $iterator The iterator used to generate the next value
@param bool $isObject True if the iterator is being handled as an object, false if not
Handles the next value from the iterator to be encoded as JSON .