src/JsonStream.php
public function getMetadata($key = null)
    {
        $meta = [
            'timed_out' => false,
            'blocked' => true,
            'eof' => $this->eof(),
            'unread_bytes' => strlen($this->buffer),
            'stream_type' => get_class($this->encoder),
            'wrapper_type' => 'OBJECT',
            'wrapper_data' => [
                'step' => $this->encoder->key(),
                'errors' => $this->encoder->getErrors(),
            ],
            'mode' => 'r',
            'seekable' => true,
            'uri' => '',
        ];

        return $key === null ? $meta : (isset($meta[$key]) ? $meta[$key] : null);
    }
public function getMetadata($key = null)
    {
        $meta = [
            'timed_out' => false,
            'blocked' => true,
            'eof' => $this->eof(),
            'unread_bytes' => strlen($this->buffer),
            'stream_type' => get_class($this->encoder),
            'wrapper_type' => 'OBJECT',
            'wrapper_data' => [
                'step' => $this->encoder->key(),
                'errors' => $this->encoder->getErrors(),
            ],
            'mode' => 'r',
            'seekable' => true,
            'uri' => '',
        ];

        return $key === null ? $meta : (isset($meta[$key]) ? $meta[$key] : null);
    }
public function getMetadata ( $ key = null ) { $ meta = [ 'timed_out' => false , 'blocked' => true , 'eof' => $ this -> eof ( ) , 'unread_bytes' => strlen ( $ this -> buffer ) , 'stream_type' => get_class ( $ this -> encoder ) , 'wrapper_type' => 'OBJECT' , 'wrapper_data' => [ 'step' => $ this -> encoder -> key ( ) , 'errors' => $ this -> encoder -> getErrors ( ) , ] , 'mode' => 'r' , 'seekable' => true , 'uri' => '' , ] ; return $ key === null ? $ meta : ( isset ( $ meta [ $ key ] ) ? $ meta [ $ key ] : null ) ; }
Returns the metadata related to the JSON stream.

No underlying PHP resource exists for the stream, but this method will
still return relevant information regarding the stream that is similar
to PHP stream meta data.

@param string|null $key The key of the value to return
@return array|mixed|null The meta data array, a specific value or null if not defined
Returns the metadata related to the JSON stream .