PHP.nl

simdjson_key_value

simdjson_key_value

Decodes the value of a JSON string located at the requested JSON pointer.

mixed **simdjson_key_value** string $json string $key bool $associative int $depth

Decodes and returns the value found at the requested JSON pointer.

json The being queried and decoded. json``string

This function only works with UTF-8 encoded strings.

   This function parses valid inputs which
    can decode,
   provided that they are less than 4 GiB long.
  `json_decode`

key The JSON pointer . string

associativeWhen true, JSON objects will be returned as associative arrays; when false, JSON objects will be returned as objects.

depth Maximum nesting depth of the structure being decoded. The value must be greater than , and less than or equal to .

  Callers should use reasonably small values,
  because larger depths require more buffer space and will
  increase the recursion depth, unlike the current  implementation.
 `0``2147483647``json_decode`

Returns the part of the value encoded in that refers to in appropriate PHP type. Values , and are returned as true, false and null respectively. json``key``true``false``null

If or is invalid, or could not be found within , a is thrown as of PECL simdjson 2.1.0, while previously, a was thrown. json``key``key``json``SimdJsonException``RuntimeException

If is outside the allowed range, a is thrown as of PECL simdjson 3.0.0, while previously, an error of level was raised. depth``SimdJsonValueError``E_WARNING

json_encode``simdjson_decode