src/Cloudinary.php
public static function encode_array_to_json($value)
    {
        if (is_null($value)) {
            return null;
        }
        $array = Cloudinary::build_array_of_assoc_arrays($value);
        return  Cloudinary::json_encode_cb($array, 'Cloudinary::encode_dates');
    }
public static function encode_array_to_json($value)
    {
        if (is_null($value)) {
            return null;
        }
        $array = Cloudinary::build_array_of_assoc_arrays($value);
        return  Cloudinary::json_encode_cb($array, 'Cloudinary::encode_dates');
    }
public static function encode_array_to_json ( $ value ) { if ( is_null ( $ value ) ) { return null ; } $ array = Cloudinary :: build_array_of_assoc_arrays ( $ value ) ; return Cloudinary :: json_encode_cb ( $ array , 'Cloudinary::encode_dates' ) ; }
Wrapper for calling build_array_of_assoc_arrays and json_encode_array_of_assoc_arrays with null value handling.

@see Cloudinary::json_encode_array_of_assoc_arrays
@see Cloudinary::build_array_of_assoc_arrays

@param array|string  $value  The value to be converted

@return string Resulting JSON string

@throws InvalidArgumentException in case value cannot be converted and encoded
Wrapper for calling build_array_of_assoc_arrays and json_encode_array_of_assoc_arrays with null value handling .