Files
simdjson-simdjson/classsimdjson_1_1dom_1_1array.html
2026-05-06 21:54:39 +00:00

582 lines
32 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>simdjson: simdjson::dom::array Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
<link href="doxygen-awesome-sidebar-only-darkmode-toggle.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectlogo"><img alt="Logo" src="logotiny.png"/></td>
<td id="projectalign">
<div id="projectname">simdjson<span id="projectnumber">&#160;4.6.4</span>
</div>
<div id="projectbrief">Ridiculously Fast JSON</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('classsimdjson_1_1dom_1_1array.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>
<div class="header">
<div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="classsimdjson_1_1dom_1_1array-members.html">List of all members</a> </div>
<div class="headertitle"><div class="title">simdjson::dom::array Class Reference</div></div>
</div><!--header-->
<div class="contents">
<p>JSON array.
<a href="classsimdjson_1_1dom_1_1array.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="dom_2array_8h_source.html">array.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array_1_1iterator.html">iterator</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8b3d6eaec52a2b44965e53d874e367e9" id="r_a8b3d6eaec52a2b44965e53d874e367e9"><td class="memItemLeft" align="right" valign="top">simdjson_inline&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#a8b3d6eaec52a2b44965e53d874e367e9">array</a> () noexcept</td></tr>
<tr class="memdesc:a8b3d6eaec52a2b44965e53d874e367e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a new, invalid array. <br /></td></tr>
<tr class="separator:a8b3d6eaec52a2b44965e53d874e367e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aebd2b7ca5e1d87476ea2cd4fc9239a74" id="r_aebd2b7ca5e1d87476ea2cd4fc9239a74"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsimdjson_1_1dom_1_1array_1_1iterator.html">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#aebd2b7ca5e1d87476ea2cd4fc9239a74">begin</a> () const noexcept</td></tr>
<tr class="memdesc:aebd2b7ca5e1d87476ea2cd4fc9239a74"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the first array element. <br /></td></tr>
<tr class="separator:aebd2b7ca5e1d87476ea2cd4fc9239a74"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a378b3312cdf6f8fe04725b617b8cfcb9" id="r_a378b3312cdf6f8fe04725b617b8cfcb9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsimdjson_1_1dom_1_1array_1_1iterator.html">iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#a378b3312cdf6f8fe04725b617b8cfcb9">end</a> () const noexcept</td></tr>
<tr class="memdesc:a378b3312cdf6f8fe04725b617b8cfcb9"><td class="mdescLeft">&#160;</td><td class="mdescRight">One past the last array element. <br /></td></tr>
<tr class="separator:a378b3312cdf6f8fe04725b617b8cfcb9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a698f2f984d1a78a68962c06b2f047686" id="r_a698f2f984d1a78a68962c06b2f047686"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#a698f2f984d1a78a68962c06b2f047686">size</a> () const noexcept</td></tr>
<tr class="memdesc:a698f2f984d1a78a68962c06b2f047686"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the size of the array (number of immediate children). <br /></td></tr>
<tr class="separator:a698f2f984d1a78a68962c06b2f047686"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a26e66312190e016c22093292974490ff" id="r_a26e66312190e016c22093292974490ff"><td class="memItemLeft" align="right" valign="top">size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#a26e66312190e016c22093292974490ff">number_of_slots</a> () const noexcept</td></tr>
<tr class="memdesc:a26e66312190e016c22093292974490ff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the total number of slots used by this array on the tape. <br /></td></tr>
<tr class="separator:a26e66312190e016c22093292974490ff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8141c7d98672bc3ab69fea7b63afcfb2" id="r_a8141c7d98672bc3ab69fea7b63afcfb2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#a8141c7d98672bc3ab69fea7b63afcfb2">at_pointer</a> (std::string_view json_pointer) const noexcept</td></tr>
<tr class="memdesc:a8141c7d98672bc3ab69fea7b63afcfb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value associated with the given JSON pointer. <br /></td></tr>
<tr class="separator:a8141c7d98672bc3ab69fea7b63afcfb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aee39c0fbcf1f7f6b75e9a31d86bedfe8" id="r_aee39c0fbcf1f7f6b75e9a31d86bedfe8"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#aee39c0fbcf1f7f6b75e9a31d86bedfe8">process_json_path_of_child_elements</a> (std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt;::iterator &amp;current, std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt;::iterator &amp;<a class="el" href="classsimdjson_1_1dom_1_1array.html#a378b3312cdf6f8fe04725b617b8cfcb9">end</a>, const std::string_view &amp;path_suffix, std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; &amp;accumulator) const noexcept</td></tr>
<tr class="memdesc:aee39c0fbcf1f7f6b75e9a31d86bedfe8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Recursive function which processes the JSON path of each child element. <br /></td></tr>
<tr class="separator:aee39c0fbcf1f7f6b75e9a31d86bedfe8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1ad9d74fd73844ca1ebcaaa88025860a" id="r_a1ad9d74fd73844ca1ebcaaa88025860a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt; std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#a1ad9d74fd73844ca1ebcaaa88025860a">at_path_with_wildcard</a> (std::string_view json_path) const noexcept</td></tr>
<tr class="memdesc:a1ad9d74fd73844ca1ebcaaa88025860a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds support for JSONPath expression with wildcards '*'. <br /></td></tr>
<tr class="separator:a1ad9d74fd73844ca1ebcaaa88025860a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa9d596ea0c2e0a6732866d5d9c1fa3ec" id="r_aa9d596ea0c2e0a6732866d5d9c1fa3ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#aa9d596ea0c2e0a6732866d5d9c1fa3ec">at_path</a> (std::string_view json_path) const noexcept</td></tr>
<tr class="memdesc:aa9d596ea0c2e0a6732866d5d9c1fa3ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value associated with the given JSONPath expression. <br /></td></tr>
<tr class="separator:aa9d596ea0c2e0a6732866d5d9c1fa3ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6a6373cc1542a7137b79978680a93d18" id="r_a6a6373cc1542a7137b79978680a93d18"><td class="memItemLeft" align="right" valign="top"><a class="el" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#a6a6373cc1542a7137b79978680a93d18">at</a> (size_t index) const noexcept</td></tr>
<tr class="memdesc:a6a6373cc1542a7137b79978680a93d18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value at the given index. <br /></td></tr>
<tr class="separator:a6a6373cc1542a7137b79978680a93d18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00a9dd263b7628a6965c7e6a25cd96a6" id="r_a00a9dd263b7628a6965c7e6a25cd96a6"><td class="memItemLeft" align="right" valign="top">std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#a00a9dd263b7628a6965c7e6a25cd96a6">get_values</a> (std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; &amp;out) const noexcept</td></tr>
<tr class="memdesc:a00a9dd263b7628a6965c7e6a25cd96a6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Gets the values of items in an array element This function has linear-time complexity: the values are checked one by one. <br /></td></tr>
<tr class="separator:a00a9dd263b7628a6965c7e6a25cd96a6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a847fee5e11177e96b18f7318f4fd46c8" id="r_a847fee5e11177e96b18f7318f4fd46c8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsimdjson_1_1dom_1_1array.html#a847fee5e11177e96b18f7318f4fd46c8">operator element</a> () const noexcept</td></tr>
<tr class="memdesc:a847fee5e11177e96b18f7318f4fd46c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implicitly convert object to element. <br /></td></tr>
<tr class="separator:a847fee5e11177e96b18f7318f4fd46c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>JSON array. </p>
<p class="definition">Definition at line <a class="el" href="dom_2array_8h_source.html#l00015">15</a> of file <a class="el" href="dom_2array_8h_source.html">array.h</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a8b3d6eaec52a2b44965e53d874e367e9" name="a8b3d6eaec52a2b44965e53d874e367e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8b3d6eaec52a2b44965e53d874e367e9">&#9670;&#160;</a></span>array()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">simdjson_inline simdjson::dom::array::array </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new, invalid array. </p>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00076">76</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a6a6373cc1542a7137b79978680a93d18" name="a6a6373cc1542a7137b79978680a93d18"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6a6373cc1542a7137b79978680a93d18">&#9670;&#160;</a></span>at()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; simdjson::dom::array::at </td>
<td>(</td>
<td class="paramtype">size_t&#160;</td>
<td class="paramname"><em>index</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the value at the given index. </p>
<p>This function has linear-time complexity and is equivalent to the following:</p>
<p>size_t i=0; for (auto element : *this) { if (i == index) { return element; } i++; } return INDEX_OUT_OF_BOUNDS;</p>
<p>Avoid calling the <a class="el" href="classsimdjson_1_1dom_1_1array.html#a6a6373cc1542a7137b79978680a93d18" title="Get the value at the given index.">at()</a> function repeatedly.</p>
<dl class="section return"><dt>Returns</dt><dd>The value at the given index, or:<ul>
<li>INDEX_OUT_OF_BOUNDS if the array index is larger than an array length </li>
</ul>
</dd></dl>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00228">228</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="aa9d596ea0c2e0a6732866d5d9c1fa3ec" name="aa9d596ea0c2e0a6732866d5d9c1fa3ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa9d596ea0c2e0a6732866d5d9c1fa3ec">&#9670;&#160;</a></span>at_path()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; simdjson::dom::array::at_path </td>
<td>(</td>
<td class="paramtype">std::string_view&#160;</td>
<td class="paramname"><em>json_path</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the value associated with the given JSONPath expression. </p>
<p>We only support JSONPath queries that trivially convertible to JSON Pointer queries: key names and array indices.</p>
<p><a href="https://www.rfc-editor.org/rfc/rfc9535">https://www.rfc-editor.org/rfc/rfc9535</a> (RFC 9535)</p>
<dl class="section return"><dt>Returns</dt><dd>The value associated with the given JSONPath expression, or:<ul>
<li>INVALID_JSON_POINTER if the JSONPath to JSON Pointer conversion fails</li>
<li>NO_SUCH_FIELD if a field does not exist in an object</li>
<li>INDEX_OUT_OF_BOUNDS if an array index is larger than an array length</li>
<li>INCORRECT_TYPE if a non-integer is used to access an array </li>
</ul>
</dd></dl>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00135">135</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="a1ad9d74fd73844ca1ebcaaa88025860a" name="a1ad9d74fd73844ca1ebcaaa88025860a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1ad9d74fd73844ca1ebcaaa88025860a">&#9670;&#160;</a></span>at_path_with_wildcard()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt; std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; &gt; simdjson::dom::array::at_path_with_wildcard </td>
<td>(</td>
<td class="paramtype">std::string_view&#160;</td>
<td class="paramname"><em>json_path</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Adds support for JSONPath expression with wildcards '*'. </p>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00162">162</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="a8141c7d98672bc3ab69fea7b63afcfb2" name="a8141c7d98672bc3ab69fea7b63afcfb2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8141c7d98672bc3ab69fea7b63afcfb2">&#9670;&#160;</a></span>at_pointer()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="structsimdjson_1_1simdjson__result.html">simdjson_result</a>&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; simdjson::dom::array::at_pointer </td>
<td>(</td>
<td class="paramtype">std::string_view&#160;</td>
<td class="paramname"><em>json_pointer</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the value associated with the given JSON pointer. </p>
<p>We use the RFC 6901 <a href="https://tools.ietf.org/html/rfc6901">https://tools.ietf.org/html/rfc6901</a> standard, interpreting the current node as the root of its own JSON document.</p>
<p><a class="el" href="classsimdjson_1_1dom_1_1parser.html" title="A persistent document parser.">dom::parser</a> parser; array a = <a class="el" href="classsimdjson_1_1dom_1_1parser.html#a16c7d1e28125ef7d5703244483f70984" title="Parse a JSON document and return a temporary reference to it.">parser.parse</a>(R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])"_padded); a.at_pointer("/0/foo/a/1") == 20 a.at_pointer("0")["foo"]["a"].at(1) == 20</p>
<dl class="section return"><dt>Returns</dt><dd>The value associated with the given JSON pointer, or:<ul>
<li>NO_SUCH_FIELD if a field does not exist in an object</li>
<li>INDEX_OUT_OF_BOUNDS if an array index is larger than an array length</li>
<li>INCORRECT_TYPE if a non-integer is used to access an array</li>
<li>INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed </li>
</ul>
</dd></dl>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00094">94</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="aebd2b7ca5e1d87476ea2cd4fc9239a74" name="aebd2b7ca5e1d87476ea2cd4fc9239a74"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aebd2b7ca5e1d87476ea2cd4fc9239a74">&#9670;&#160;</a></span>begin()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classsimdjson_1_1dom_1_1array_1_1iterator.html">array::iterator</a> simdjson::dom::array::begin </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the first array element. </p>
<p>Part of the std::iterable interface. </p>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00078">78</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="a378b3312cdf6f8fe04725b617b8cfcb9" name="a378b3312cdf6f8fe04725b617b8cfcb9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a378b3312cdf6f8fe04725b617b8cfcb9">&#9670;&#160;</a></span>end()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classsimdjson_1_1dom_1_1array_1_1iterator.html">array::iterator</a> simdjson::dom::array::end </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>One past the last array element. </p>
<p>Part of the std::iterable interface. </p>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00082">82</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="a00a9dd263b7628a6965c7e6a25cd96a6" name="a00a9dd263b7628a6965c7e6a25cd96a6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00a9dd263b7628a6965c7e6a25cd96a6">&#9670;&#160;</a></span>get_values()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; &amp; simdjson::dom::array::get_values </td>
<td>(</td>
<td class="paramtype">std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>out</em></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Gets the values of items in an array element This function has linear-time complexity: the values are checked one by one. </p>
<dl class="section return"><dt>Returns</dt><dd>The child elements of an array </dd></dl>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00238">238</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="a26e66312190e016c22093292974490ff" name="a26e66312190e016c22093292974490ff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a26e66312190e016c22093292974490ff">&#9670;&#160;</a></span>number_of_slots()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t simdjson::dom::array::number_of_slots </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the total number of slots used by this array on the tape. </p>
<p>Note that this is not the same thing as <code><a class="el" href="classsimdjson_1_1dom_1_1array.html#a698f2f984d1a78a68962c06b2f047686" title="Get the size of the array (number of immediate children).">size()</a></code>, which reports the number of actual elements within an array (not counting its children).</p>
<p>Since an element can use 1 or 2 slots on the tape, you can only use this to figure out the total size of an array (including its children, recursively) if you know its structure ahead of time. </p>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00090">90</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="a847fee5e11177e96b18f7318f4fd46c8" name="a847fee5e11177e96b18f7318f4fd46c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a847fee5e11177e96b18f7318f4fd46c8">&#9670;&#160;</a></span>operator element()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">simdjson::dom::array::operator <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Implicitly convert object to element. </p>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00247">247</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="aee39c0fbcf1f7f6b75e9a31d86bedfe8" name="aee39c0fbcf1f7f6b75e9a31d86bedfe8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aee39c0fbcf1f7f6b75e9a31d86bedfe8">&#9670;&#160;</a></span>process_json_path_of_child_elements()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void simdjson::dom::array::process_json_path_of_child_elements </td>
<td>(</td>
<td class="paramtype">std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt;::iterator &amp;&#160;</td>
<td class="paramname"><em>current</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt;::iterator &amp;&#160;</td>
<td class="paramname"><em>end</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const std::string_view &amp;&#160;</td>
<td class="paramname"><em>path_suffix</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::vector&lt; <a class="el" href="classsimdjson_1_1dom_1_1element.html">element</a> &gt; &amp;&#160;</td>
<td class="paramname"><em>accumulator</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Recursive function which processes the JSON path of each child element. </p>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00141">141</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<a id="a698f2f984d1a78a68962c06b2f047686" name="a698f2f984d1a78a68962c06b2f047686"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a698f2f984d1a78a68962c06b2f047686">&#9670;&#160;</a></span>size()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">size_t simdjson::dom::array::size </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">noexcept</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the size of the array (number of immediate children). </p>
<p>It is a saturated value with a maximum of 0xFFFFFF: if the value is 0xFFFFFF then the size is 0xFFFFFF or greater. </p>
<p class="definition">Definition at line <a class="el" href="dom_2array-inl_8h_source.html#l00086">86</a> of file <a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/simdjson/dom/<a class="el" href="dom_2array_8h_source.html">array.h</a></li>
<li>include/simdjson/dom/<a class="el" href="dom_2array-inl_8h_source.html">array-inl.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="navelem"><a class="el" href="namespacesimdjson.html">simdjson</a></li><li class="navelem"><a class="el" href="namespacesimdjson_1_1dom.html">dom</a></li><li class="navelem"><a class="el" href="classsimdjson_1_1dom_1_1array.html">array</a></li>
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
</ul>
</div>
</body>
</html>