src/Http/Response/Format/JsonOptionalFormatting.php
protected function performJsonEncoding($content, array $jsonEncodeOptions = [])
    {
        $jsonEncodeOptions = $this->filterJsonEncodeOptions($jsonEncodeOptions);

        $optionsBitmask = $this->calucateJsonEncodeOptionsBitmask($jsonEncodeOptions);

        if (($encodedString = json_encode($content, $optionsBitmask)) === false) {
            throw new \ErrorException('Error encoding data in JSON format: '.json_last_error());
        }

        return $encodedString;
    }
protected function performJsonEncoding($content, array $jsonEncodeOptions = [])
    {
        $jsonEncodeOptions = $this->filterJsonEncodeOptions($jsonEncodeOptions);

        $optionsBitmask = $this->calucateJsonEncodeOptionsBitmask($jsonEncodeOptions);

        if (($encodedString = json_encode($content, $optionsBitmask)) === false) {
            throw new \ErrorException('Error encoding data in JSON format: '.json_last_error());
        }

        return $encodedString;
    }
protected function performJsonEncoding ( $ content , array $ jsonEncodeOptions = [ ] ) { $ jsonEncodeOptions = $ this -> filterJsonEncodeOptions ( $ jsonEncodeOptions ) ; $ optionsBitmask = $ this -> calucateJsonEncodeOptionsBitmask ( $ jsonEncodeOptions ) ; if ( ( $ encodedString = json_encode ( $ content , $ optionsBitmask ) ) === false ) { throw new \ ErrorException ( 'Error encoding data in JSON format: ' . json_last_error ( ) ) ; } return $ encodedString ; }
Perform JSON encode.

@param string $content
@param array  $jsonEncodeOptions

@return string
Perform JSON encode .