• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/json-c/doc/html/json__object__iterator_8h.html

  1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2 <html xmlns="http://www.w3.org/1999/xhtml">
  3 <head>
  4 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6 <title>json-c: /home/erh/json-c-0.15/json_object_iterator.h File Reference</title>
  7 <link href="tabs.css" rel="stylesheet" type="text/css"/>
  8 <script type="text/javascript" src="jquery.js"></script>
  9 <script type="text/javascript" src="dynsections.js"></script>
 10 <link href="doxygen.css" rel="stylesheet" type="text/css" />
 11 </head>
 12 <body>
 13 <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
 14 <div id="titlearea">
 15 <table cellspacing="0" cellpadding="0">
 16  <tbody>
 17  <tr style="height: 56px;">
 18   <td style="padding-left: 0.5em;">
 19    <div id="projectname">json-c
 20    &#160;<span id="projectnumber">0.15</span>
 21    </div>
 22   </td>
 23  </tr>
 24  </tbody>
 25 </table>
 26 </div>
 27 <!-- end header part -->
 28 <!-- Generated by Doxygen 1.8.2 -->
 29   <div id="navrow1" class="tabs">
 30     <ul class="tablist">
 31       <li><a href="index.html"><span>Main&#160;Page</span></a></li>
 32       <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
 33       <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
 34       <li class="current"><a href="files.html"><span>Files</span></a></li>
 35     </ul>
 36   </div>
 37   <div id="navrow2" class="tabs2">
 38     <ul class="tablist">
 39       <li><a href="files.html"><span>File&#160;List</span></a></li>
 40       <li><a href="globals.html"><span>Globals</span></a></li>
 41     </ul>
 42   </div>
 43 <div id="nav-path" class="navpath">
 44   <ul>
 45 <li class="navelem"><a class="el" href="dir_71f13e590eb9d766c31051438785ada5.html">json-c-0.15</a></li>  </ul>
 46 </div>
 47 </div><!-- top -->
 48 <div class="header">
 49   <div class="summary">
 50 <a href="#nested-classes">Data Structures</a> &#124;
 51 <a href="#func-members">Functions</a>  </div>
 52   <div class="headertitle">
 53 <div class="title">json_object_iterator.h File Reference</div>  </div>
 54 </div><!--header-->
 55 <div class="contents">
 56 
 57 <p>An API for iterating over json_type_object objects, styled to be familiar to C++ programmers. Unlike <a class="el" href="json__object_8h.html#acf5f514a9e0061c10fc08055762639ee">json_object_object_foreach()</a> and <a class="el" href="json__object_8h.html#a71f07006c12d78f7bbf4cb716a5af3a6">json_object_object_foreachC()</a>, this avoids the need to expose json-c internals like <a class="el" href="structlh__entry.html">lh_entry</a>.  
 58 <a href="#details">More...</a></p>
 59 <table class="memberdecls">
 60 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
 61 Data Structures</h2></td></tr>
 62 <tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structjson__object__iterator.html">json_object_iterator</a></td></tr>
 63 <tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
 64 </table><table class="memberdecls">
 65 <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
 66 Functions</h2></td></tr>
 67 <tr class="memitem:ae93958fa755852192553f1686d248cd1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <br class="typebreak"/>
 68 <a class="el" href="structjson__object__iterator.html">json_object_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object__iterator_8h.html#ae93958fa755852192553f1686d248cd1">json_object_iter_init_default</a> (void)</td></tr>
 69 <tr class="separator:ae93958fa755852192553f1686d248cd1"><td class="memSeparator" colspan="2">&#160;</td></tr>
 70 <tr class="memitem:afdcd32f83dd8f20e25669f197fb7bde9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <br class="typebreak"/>
 71 <a class="el" href="structjson__object__iterator.html">json_object_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object__iterator_8h.html#afdcd32f83dd8f20e25669f197fb7bde9">json_object_iter_begin</a> (struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
 72 <tr class="separator:afdcd32f83dd8f20e25669f197fb7bde9"><td class="memSeparator" colspan="2">&#160;</td></tr>
 73 <tr class="memitem:a381fbae848a3268013110002d553c32e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <br class="typebreak"/>
 74 <a class="el" href="structjson__object__iterator.html">json_object_iterator</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object__iterator_8h.html#a381fbae848a3268013110002d553c32e">json_object_iter_end</a> (const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *obj)</td></tr>
 75 <tr class="separator:a381fbae848a3268013110002d553c32e"><td class="memSeparator" colspan="2">&#160;</td></tr>
 76 <tr class="memitem:a8a152d153844f1ec1698419abae8c2e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object__iterator_8h.html#a8a152d153844f1ec1698419abae8c2e4">json_object_iter_next</a> (struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *iter)</td></tr>
 77 <tr class="separator:a8a152d153844f1ec1698419abae8c2e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
 78 <tr class="memitem:adbbc3583aef14d9416a0fc8dbf750727"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object__iterator_8h.html#adbbc3583aef14d9416a0fc8dbf750727">json_object_iter_peek_name</a> (const struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *iter)</td></tr>
 79 <tr class="separator:adbbc3583aef14d9416a0fc8dbf750727"><td class="memSeparator" colspan="2">&#160;</td></tr>
 80 <tr class="memitem:ad8fe9251ca04af4d8e6840a44de7984b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object__iterator_8h.html#ad8fe9251ca04af4d8e6840a44de7984b">json_object_iter_peek_value</a> (const struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *iter)</td></tr>
 81 <tr class="separator:ad8fe9251ca04af4d8e6840a44de7984b"><td class="memSeparator" colspan="2">&#160;</td></tr>
 82 <tr class="memitem:a9cbb250d185348e8b193a886c35ae39e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="json__object__iterator_8h.html#a9cbb250d185348e8b193a886c35ae39e">json_object_iter_equal</a> (const struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *iter1, const struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *iter2)</td></tr>
 83 <tr class="separator:a9cbb250d185348e8b193a886c35ae39e"><td class="memSeparator" colspan="2">&#160;</td></tr>
 84 </table>
 85 <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
 86 <div class="textblock"><p>An API for iterating over json_type_object objects, styled to be familiar to C++ programmers. Unlike <a class="el" href="json__object_8h.html#acf5f514a9e0061c10fc08055762639ee">json_object_object_foreach()</a> and <a class="el" href="json__object_8h.html#a71f07006c12d78f7bbf4cb716a5af3a6">json_object_object_foreachC()</a>, this avoids the need to expose json-c internals like <a class="el" href="structlh__entry.html">lh_entry</a>. </p>
 87 <p>Copyright (c) 2009-2012 Hewlett-Packard Development Company, L.P.</p>
 88 <p>This library is free software; you can redistribute it and/or modify it under the terms of the MIT license. See COPYING for details.</p>
 89 <p>API attributes: <br/>
 90 </p>
 91 <ul>
 92 <li>Thread-safe: NO<br/>
 93 </li>
 94 <li>Reentrant: NO </li>
 95 </ul>
 96 </div><h2 class="groupheader">Function Documentation</h2>
 97 <a class="anchor" id="afdcd32f83dd8f20e25669f197fb7bde9"></a>
 98 <div class="memitem">
 99 <div class="memproto">
100 <table class="mlabels">
101   <tr>
102   <td class="mlabels-left">
103       <table class="memname">
104         <tr>
105           <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> json_object_iter_begin </td>
106           <td>(</td>
107           <td class="paramtype">struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *&#160;</td>
108           <td class="paramname"><em>obj</em></td><td>)</td>
109           <td></td>
110         </tr>
111       </table>
112   </td>
113   <td class="mlabels-right">
114 <span class="mlabels"><span class="mlabel">read</span></span>  </td>
115   </tr>
116 </table>
117 </div><div class="memdoc">
118 <p>Retrieves an iterator to the first pair of the JSON Object.</p>
119 <dl class="section warning"><dt>Warning</dt><dd>Any modification of the underlying pair invalidates all iterators to that pair.</dd></dl>
120 <dl class="params"><dt>Parameters</dt><dd>
121   <table class="params">
122     <tr><td class="paramname">obj</td><td>JSON Object instance (MUST be of type json_object)</td></tr>
123   </table>
124   </dd>
125 </dl>
126 <dl class="section return"><dt>Returns</dt><dd><a class="el" href="structjson__object__iterator.html">json_object_iterator</a> If the JSON Object has at least one pair, on return, the iterator refers to the first pair. If the JSON Object doesn't have any pairs, the returned iterator is equivalent to the "end" iterator for the same JSON Object instance.</dd></dl>
127 <div class="fragment"><div class="line"><span class="keyword">struct </span><a class="code" href="structjson__object__iterator.html">json_object_iterator</a> it;</div>
128 <div class="line"><span class="keyword">struct </span><a class="code" href="structjson__object__iterator.html">json_object_iterator</a> itEnd;</div>
129 <div class="line"><span class="keyword">struct </span><a class="code" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914" title="The core type for all type of JSON objects handled by json-c.">json_object</a>* obj;</div>
130 <div class="line"></div>
131 <div class="line">obj = <a class="code" href="json__tokener_8h.html#a236ef64d079822a4411d13eae7190c4d">json_tokener_parse</a>(<span class="stringliteral">&quot;{&#39;first&#39;:&#39;george&#39;, &#39;age&#39;:100}&quot;</span>);</div>
132 <div class="line">it = <a class="code" href="json__object__iterator_8h.html#afdcd32f83dd8f20e25669f197fb7bde9">json_object_iter_begin</a>(obj);</div>
133 <div class="line">itEnd = <a class="code" href="json__object__iterator_8h.html#a381fbae848a3268013110002d553c32e">json_object_iter_end</a>(obj);</div>
134 <div class="line"></div>
135 <div class="line"><span class="keywordflow">while</span> (!<a class="code" href="json__object__iterator_8h.html#a9cbb250d185348e8b193a886c35ae39e">json_object_iter_equal</a>(&amp;it, &amp;itEnd)) {</div>
136 <div class="line">    printf(<span class="stringliteral">&quot;%s\n&quot;</span>,</div>
137 <div class="line">           <a class="code" href="json__object__iterator_8h.html#adbbc3583aef14d9416a0fc8dbf750727">json_object_iter_peek_name</a>(&amp;it));</div>
138 <div class="line">    <a class="code" href="json__object__iterator_8h.html#a8a152d153844f1ec1698419abae8c2e4">json_object_iter_next</a>(&amp;it);</div>
139 <div class="line">}</div>
140 </div><!-- fragment --> 
141 </div>
142 </div>
143 <a class="anchor" id="a381fbae848a3268013110002d553c32e"></a>
144 <div class="memitem">
145 <div class="memproto">
146 <table class="mlabels">
147   <tr>
148   <td class="mlabels-left">
149       <table class="memname">
150         <tr>
151           <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> json_object_iter_end </td>
152           <td>(</td>
153           <td class="paramtype">const struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a> *&#160;</td>
154           <td class="paramname"><em>obj</em></td><td>)</td>
155           <td></td>
156         </tr>
157       </table>
158   </td>
159   <td class="mlabels-right">
160 <span class="mlabels"><span class="mlabel">read</span></span>  </td>
161   </tr>
162 </table>
163 </div><div class="memdoc">
164 <p>Retrieves the iterator that represents the position beyond the last pair of the given JSON Object instance.</p>
165 <dl class="section warning"><dt>Warning</dt><dd>Do NOT write code that assumes that the "end" iterator value is NULL, even if it is so in a particular instance of the implementation.</dd></dl>
166 <dl class="section note"><dt>Note</dt><dd>The reason we do not (and MUST NOT) provide "json_object_iter_is_end(json_object_iterator* iter)" type of API is because it would limit the underlying representation of name/value containment (or force us to add additional, otherwise unnecessary, fields to the iterator structure). The "end" iterator and the equality test method, on the other hand, permit us to cleanly abstract pretty much any reasonable underlying representation without burdening the iterator structure with unnecessary data.</dd>
167 <dd>
168 For performance reasons, memorize the "end" iterator prior to any loop.</dd></dl>
169 <dl class="params"><dt>Parameters</dt><dd>
170   <table class="params">
171     <tr><td class="paramname">obj</td><td>JSON Object instance (MUST be of type json_object)</td></tr>
172   </table>
173   </dd>
174 </dl>
175 <dl class="section return"><dt>Returns</dt><dd><a class="el" href="structjson__object__iterator.html">json_object_iterator</a> On return, the iterator refers to the "end" of the Object instance's pairs (i.e., NOT the last pair, but "beyond the last
176              pair" value) </dd></dl>
177 
178 </div>
179 </div>
180 <a class="anchor" id="a9cbb250d185348e8b193a886c35ae39e"></a>
181 <div class="memitem">
182 <div class="memproto">
183       <table class="memname">
184         <tr>
185           <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> <a class="el" href="json__types_8h.html#a81f02022906fafc71eb9197049f07f73">json_bool</a> json_object_iter_equal </td>
186           <td>(</td>
187           <td class="paramtype">const struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *&#160;</td>
188           <td class="paramname"><em>iter1</em>, </td>
189         </tr>
190         <tr>
191           <td class="paramkey"></td>
192           <td></td>
193           <td class="paramtype">const struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *&#160;</td>
194           <td class="paramname"><em>iter2</em>&#160;</td>
195         </tr>
196         <tr>
197           <td></td>
198           <td>)</td>
199           <td></td><td></td>
200         </tr>
201       </table>
202 </div><div class="memdoc">
203 <p>Tests two iterators for equality. Typically used to test for end of iteration by comparing an iterator to the corresponding "end" iterator (that was derived from the same JSON Object instance).</p>
204 <dl class="section note"><dt>Note</dt><dd>The reason we do not (and MUST NOT) provide "json_object_iter_is_end(json_object_iterator* iter)" type of API is because it would limit the underlying representation of name/value containment (or force us to add additional, otherwise unnecessary, fields to the iterator structure). The equality test method, on the other hand, permits us to cleanly abstract pretty much any reasonable underlying representation.</dd></dl>
205 <dl class="params"><dt>Parameters</dt><dd>
206   <table class="params">
207     <tr><td class="paramname">iter1</td><td>Pointer to first valid, non-NULL iterator </td></tr>
208     <tr><td class="paramname">iter2</td><td>POinter to second valid, non-NULL iterator</td></tr>
209   </table>
210   </dd>
211 </dl>
212 <dl class="section warning"><dt>Warning</dt><dd>if a NULL iterator pointer or an uninitialized or invalid iterator, or iterators derived from different JSON Object instances are passed, bad things will happen!</dd></dl>
213 <dl class="section return"><dt>Returns</dt><dd>json_bool non-zero if iterators are equal (i.e., both reference the same name/value pair or are both at "end"); zero if they are not equal. </dd></dl>
214 
215 </div>
216 </div>
217 <a class="anchor" id="ae93958fa755852192553f1686d248cd1"></a>
218 <div class="memitem">
219 <div class="memproto">
220 <table class="mlabels">
221   <tr>
222   <td class="mlabels-left">
223       <table class="memname">
224         <tr>
225           <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> json_object_iter_init_default </td>
226           <td>(</td>
227           <td class="paramtype">void&#160;</td>
228           <td class="paramname"></td><td>)</td>
229           <td></td>
230         </tr>
231       </table>
232   </td>
233   <td class="mlabels-right">
234 <span class="mlabels"><span class="mlabel">read</span></span>  </td>
235   </tr>
236 </table>
237 </div><div class="memdoc">
238 <p>Initializes an iterator structure to a "default" value that is convenient for initializing an iterator variable to a default state (e.g., initialization list in a class' constructor).</p>
239 <div class="fragment"><div class="line"><span class="keyword">struct </span><a class="code" href="structjson__object__iterator.html">json_object_iterator</a> iter = <a class="code" href="json__object__iterator_8h.html#ae93958fa755852192553f1686d248cd1">json_object_iter_init_default</a>();</div>
240 <div class="line">MyClass() : iter_(<a class="code" href="json__object__iterator_8h.html#ae93958fa755852192553f1686d248cd1">json_object_iter_init_default</a>())</div>
241 </div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>The initialized value doesn't reference any specific pair, is considered an invalid iterator, and MUST NOT be passed to any json-c API that expects a valid iterator.</dd>
242 <dd>
243 User and internal code MUST NOT make any assumptions about and dependencies on the value of the "default" iterator value.</dd></dl>
244 <dl class="section return"><dt>Returns</dt><dd><a class="el" href="structjson__object__iterator.html">json_object_iterator</a> </dd></dl>
245 
246 </div>
247 </div>
248 <a class="anchor" id="a8a152d153844f1ec1698419abae8c2e4"></a>
249 <div class="memitem">
250 <div class="memproto">
251       <table class="memname">
252         <tr>
253           <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> void json_object_iter_next </td>
254           <td>(</td>
255           <td class="paramtype">struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *&#160;</td>
256           <td class="paramname"><em>iter</em></td><td>)</td>
257           <td></td>
258         </tr>
259       </table>
260 </div><div class="memdoc">
261 <p>Returns an iterator to the next pair, if any</p>
262 <dl class="section warning"><dt>Warning</dt><dd>Any modification of the underlying pair invalidates all iterators to that pair.</dd></dl>
263 <dl class="params"><dt>Parameters</dt><dd>
264   <table class="params">
265     <tr><td class="paramname">iter</td><td>[IN/OUT] Pointer to iterator that references a name/value pair; MUST be a valid, non-end iterator. WARNING: bad things will happen if invalid or "end" iterator is passed. Upon return will contain the reference to the next pair if there is one; if there are no more pairs, will contain the "end" iterator value, which may be compared against the return value of <a class="el" href="json__object__iterator_8h.html#a381fbae848a3268013110002d553c32e">json_object_iter_end()</a> for the same JSON Object instance. </td></tr>
266   </table>
267   </dd>
268 </dl>
269 
270 </div>
271 </div>
272 <a class="anchor" id="adbbc3583aef14d9416a0fc8dbf750727"></a>
273 <div class="memitem">
274 <div class="memproto">
275       <table class="memname">
276         <tr>
277           <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> const char* json_object_iter_peek_name </td>
278           <td>(</td>
279           <td class="paramtype">const struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *&#160;</td>
280           <td class="paramname"><em>iter</em></td><td>)</td>
281           <td></td>
282         </tr>
283       </table>
284 </div><div class="memdoc">
285 <p>Returns a const pointer to the name of the pair referenced by the given iterator.</p>
286 <dl class="params"><dt>Parameters</dt><dd>
287   <table class="params">
288     <tr><td class="paramname">iter</td><td>pointer to iterator that references a name/value pair; MUST be a valid, non-end iterator.</td></tr>
289   </table>
290   </dd>
291 </dl>
292 <dl class="section warning"><dt>Warning</dt><dd>bad things will happen if an invalid or "end" iterator is passed.</dd></dl>
293 <dl class="section return"><dt>Returns</dt><dd>const char* Pointer to the name of the referenced name/value pair. The name memory belongs to the name/value pair, will be freed when the pair is deleted or modified, and MUST NOT be modified or freed by the user. </dd></dl>
294 
295 </div>
296 </div>
297 <a class="anchor" id="ad8fe9251ca04af4d8e6840a44de7984b"></a>
298 <div class="memitem">
299 <div class="memproto">
300 <table class="mlabels">
301   <tr>
302   <td class="mlabels-left">
303       <table class="memname">
304         <tr>
305           <td class="memname"><a class="el" href="printbuf_8h.html#a2a31d5c00f3a4712f2d5d62aee66344e">JSON_EXPORT</a> struct <a class="el" href="json__types_8h.html#af27907ced0f5a43409ad96430fe0f914">json_object</a>* json_object_iter_peek_value </td>
306           <td>(</td>
307           <td class="paramtype">const struct <a class="el" href="structjson__object__iterator.html">json_object_iterator</a> *&#160;</td>
308           <td class="paramname"><em>iter</em></td><td>)</td>
309           <td></td>
310         </tr>
311       </table>
312   </td>
313   <td class="mlabels-right">
314 <span class="mlabels"><span class="mlabel">read</span></span>  </td>
315   </tr>
316 </table>
317 </div><div class="memdoc">
318 <p>Returns a pointer to the json-c instance representing the value of the referenced name/value pair, without altering the instance's reference count.</p>
319 <dl class="params"><dt>Parameters</dt><dd>
320   <table class="params">
321     <tr><td class="paramname">iter</td><td>pointer to iterator that references a name/value pair; MUST be a valid, non-end iterator.</td></tr>
322   </table>
323   </dd>
324 </dl>
325 <dl class="section warning"><dt>Warning</dt><dd>bad things will happen if invalid or "end" iterator is passed.</dd></dl>
326 <dl class="section return"><dt>Returns</dt><dd>struct json_object* Pointer to the json-c value instance of the referenced name/value pair; the value's reference count is not changed by this function: if you plan to hold on to this json-c node, take a look at <a class="el" href="json__object_8h.html#a675aa3a9cced685dbfd1c1a770a0c3e4">json_object_get()</a> and <a class="el" href="json__object_8h.html#afabf61f932cd64a4122ca8092452eed5">json_object_put()</a>. IMPORTANT: json-c API represents the JSON Null value as a NULL json_object instance pointer. </dd></dl>
327 
328 </div>
329 </div>
330 </div><!-- contents -->
331 <!-- start footer part -->
332 <hr class="footer"/><address class="footer"><small>
333 Generated on Sun Jul 26 2020 15:11:19 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
334 <img class="footer" src="doxygen.png" alt="doxygen"/>
335 </a> 1.8.2
336 </small></address>
337 </body>
338 </html>

This page was automatically generated by LXR 0.3.1.  •  OpenWrt