The method parameters are the same as those for the PHP native json_decode() function.
Parameters
$associativebool|nulloptional
When true, JSON objects will be returned as associative arrays; When false, JSON objects will be returned as objects. When null, JSON objects will be returned as associative arrays or objects depending on whether JSON_OBJECT_AS_ARRAY is set in the flags. Defaults to true (in contrast to the PHP native default of null).Default: true
$depthintoptional
Maximum nesting depth of the structure being decoded. Defaults to 512.Default: 512
$optionsintoptional
Bitmask of JSON_BIGINT_AS_STRING, JSON_INVALID_UTF8_IGNORE, JSON_INVALID_UTF8_SUBSTITUTE, JSON_OBJECT_AS_ARRAY, JSON_THROW_ON_ERROR. Defaults to 0 (no options set).Default: 0
Signature, return type and hooks compared across 5 parsed releases.
About this page
Parsed data
Generated from the wordpress-develop 6.8.8 tag, from src/wp-includes/Requests/src/Response.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.