WordPress at a glance
function is not described

json_decode() WP 1.0

No Hooks.

Return

Object/Array.

Usage

json_decode( $string, $assoc_array );
$string(string) (required)
$assoc_array(true/false)

Default: false

Notes

  • Global. Services_JSON. $wp_json

Code of json decode: wp-includes/compat.php WP 5.2.2

<?php
function json_decode( $string, $assoc_array = false ) {
	global $wp_json;

	if ( ! ( $wp_json instanceof Services_JSON ) ) {
		require_once( ABSPATH . WPINC . '/class-json.php' );
		$wp_json = new Services_JSON();
	}

	$res = $wp_json->decode( $string );
	if ( $assoc_array ) {
		$res = _json_decode_object_helper( $res );
	}
	return $res;
}