WordPress at a glance
function is not described

Services_JSON::name_value() 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.

array-walking function for use in generating JSON-formatted name-value pairs

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

No Hooks.

Return

String. JSON-formatted name-value pair, like '"name":value'

Usage

$Services_JSON = new Services_JSON();
$Services_JSON->name_value( $name, $value );
$name(string) (required)
name of key to use
$value(mixed) (required)
reference to an array element to be encoded

Changelog

Deprecated Since 5.3.0 Use the PHP native JSON extension instead.

Code of Services_JSON::name_value() WP 5.5.1

<?php
function name_value($name, $value)
{
    _deprecated_function( __METHOD__, '5.3.0', 'The PHP native JSON extension' );

    $encoded_value = $this->_encode($value);

    if(Services_JSON::isError($encoded_value)) {
        return $encoded_value;
    }

    return $this->_encode(strval($name)) . ':' . $encoded_value;
}