lib/Elastica/JSON.php
public static function stringify($args/* inherit from json_encode */)
    {
        // extract arguments
        $args = \func_get_args();

        // run encode and output
        $string = \call_user_func_array('json_encode', $args);

        // turn errors into exceptions for easier catching
        if ($error = self::getJsonLastErrorMsg()) {
            throw new JSONParseException($error);
        }

        // output
        return $string;
    }
public static function stringify($args/* inherit from json_encode */)
    {
        // extract arguments
        $args = \func_get_args();

        // run encode and output
        $string = \call_user_func_array('json_encode', $args);

        // turn errors into exceptions for easier catching
        if ($error = self::getJsonLastErrorMsg()) {
            throw new JSONParseException($error);
        }

        // output
        return $string;
    }
public static function stringify ( $ args /* inherit from json_encode */ ) { // extract arguments $ args = \ func_get_args ( ) ; // run encode and output $ string = \ call_user_func_array ( 'json_encode' , $ args ) ; // turn errors into exceptions for easier catching if ( $ error = self :: getJsonLastErrorMsg ( ) ) { throw new JSONParseException ( $ error ) ; } // output return $ string ; }
Convert input to JSON string with standard options.

@see http://php.net/manual/en/function.json-encode.php
@see http://php.net/manual/en/function.json-last-error.php

@param mixed $args,... Target to stringify

@throws JSONParseException

@return string Valid JSON representation of $input
Convert input to JSON string with standard options .