PHP.nl

simdjson_key_count

simdjson_key_count

Returns the value at a JSON pointer.

int **simdjson_key_count** string $json string $key int $depth bool $throw_if_uncountable

Count the number of elements of the object/array found at the requested JSON pointer.

json The being queried. json``string

key The JSON pointer . string

depth Maximum nesting depth of the structure being validated. 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`

throw_if_uncountable When true, a will be thrown instead of returning 0 when the value the JSON pointer points to is neither an object nor an array. SimdJsonException

Returns an integer with the number of elements of the value at the given JSON pointer.