YoastSEO_Vendor\GuzzleHttp
json_decode() Yoast 1.0
Wrapper for json_decode that throws when an error occurs.
Хуков нет.
Возвращает
Разное.
Использование
json_decode( $json, $assoc, $depth, $options );
- $json(строка) (обязательный)
- JSON data to parse
- $assoc(true/false)
- When true, returned objects will be converted into associative arrays.
По умолчанию: \false - $depth(число)
- User specified recursion depth.
По умолчанию: 512 - $options(число)
- Bitmask of JSON decode options.
По умолчанию: 0
Код json_decode() json decode Yoast 15.6.2
function json_decode($json, $assoc = \false, $depth = 512, $options = 0)
{
$data = \json_decode($json, $assoc, $depth, $options);
if (\JSON_ERROR_NONE !== \json_last_error()) {
throw new \InvalidArgumentException('json_decode error: ' . \json_last_error_msg());
}
return $data;
}