src/JsonUtils.php
public static function encode($value, $options = 0)
    {
        $result = json_encode($value, (int) $options);
        // @codeCoverageIgnoreStart
        if ($result === false) {
            throw new \RuntimeException(static::$errorMessages[json_last_error()]);
        }
        // @codeCoverageIgnoreEnd

        return $result;
    }
public static function encode($value, $options = 0)
    {
        $result = json_encode($value, (int) $options);
        // @codeCoverageIgnoreStart
        if ($result === false) {
            throw new \RuntimeException(static::$errorMessages[json_last_error()]);
        }
        // @codeCoverageIgnoreEnd

        return $result;
    }
public static function encode ( $ value , $ options = 0 ) { $ result = json_encode ( $ value , ( int ) $ options ) ; // @codeCoverageIgnoreStart if ( $ result === false ) { throw new \ RuntimeException ( static :: $ errorMessages [ json_last_error ( ) ] ) ; } // @codeCoverageIgnoreEnd return $ result ; }
Encode a PHP value into a JSON representation.

@param mixed $value
@param int   $options [optional]

@throws \RuntimeException

@return string

@link http://php.net/manual/en/function.json-encode.php
Encode a PHP value into a JSON representation .