WordPress at a glance
function is not described

Services_JSON::encodeUnsafe() public WP 1.0

Deprecated in from version 5.3.0. It is no longer supported and can be removed in future releases. Use PHP native JSON extension instead.

encodes an arbitrary variable into JSON format without JSON Header - warning - may allow XSS!!!!)

{} It's a method of the class: Services_JSON{}

No Hooks.

Return

Mixed. JSON string representation of input var or an error if a problem occurs

Usage

$Services_JSON = new Services_JSON();
$Services_JSON->encodeUnsafe( $var );
$var(mixed) (required)
any number, boolean, string, array, or object to be encoded. see argument 1 to Services_JSON() above for array-parsing behavior. if var is a string, note that encode() always expects it to be in ASCII or UTF-8 format!

Changelog

Deprecated Since 5.3.0 Use the PHP native JSON extension instead.

Code of Services_JSON::encodeUnsafe() WP 5.5.1

<?php
function encodeUnsafe($var)
{
    _deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' );

    // see bug #16908 - regarding numeric locale printing
    $lc = setlocale(LC_NUMERIC, 0);
    setlocale(LC_NUMERIC, 'C');
    $ret = $this->_encode($var);
    setlocale(LC_NUMERIC, $lc);
    return $ret;
    
}