1
0
mirror of https://github.com/php/doc-ru.git synced 2026-03-26 00:32:15 +01:00
Files
archived-doc-ru/reference/simdjson/functions/simdjson-key-count.xml
2022-10-30 23:27:57 +03:00

96 lines
3.7 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 3f3362ebcdd1a27cf9c9c751dd5cbe8a6264d1c3 Maintainer: sergey Status: ready -->
<!-- Reviewed: no -->
<refentry xml:id="function.simdjson-key-count" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>simdjson_key_count</refname>
<refpurpose>Возвращает значение по указателю JSON</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>simdjson_key_count</methodname>
<methodparam><type>string</type><parameter>json</parameter></methodparam>
<methodparam><type>string</type><parameter>key</parameter></methodparam>
<methodparam choice="opt"><type>int</type><parameter>depth</parameter><initializer>512</initializer></methodparam>
<methodparam choice="opt"><type>bool</type><parameter>throw_if_uncountable</parameter><initializer>&false;</initializer></methodparam>
</methodsynopsis>
<para>
Подсчитывает количество элементов объекта/массива, найденных по запрошенному указателю JSON.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<variablelist>
<varlistentry>
<term><parameter>json</parameter></term>
<listitem>
<para>
Запрашиваемая строка (<type>string</type>) в формате <parameter>json</parameter>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>key</parameter></term>
<listitem>
<para>
Строка (<type>string</type>) указатель JSON.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>depth</parameter></term>
<listitem>
<para>
Максимальная глубина вложенности декодируемой структуры.
Значение должно быть больше <literal>0</literal> и меньше или равно <literal>2147483647</literal>.
Вызывающие команды должны использовать достаточно маленькие значения,
поскольку большая глубина требуют больше места в буфере и увеличивают глубину рекурсии,
в отличие от текущей реализации функции <function>json_decode</function>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>throw_if_uncountable</parameter></term>
<listitem>
<para>
При значении &true; вместо возвращаемого значения 0 будет выброшено исключение <classname>SimdJsonException</classname>,
если значение, на которое указывает указатель JSON, не является ни объектом, ни массивом.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Возвращает целое число (&integer;) с количеством элементов значения по заданному указателю JSON.
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->