mirror of
https://github.com/json-c/json-c.git
synced 2026-03-21 22:19:07 +08:00
Add doxygen-generated docs for the 0.12.1 release.
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.8.5"/>
|
||||
<meta name="generator" content="Doxygen 1.8.9.1"/>
|
||||
<title>json-c: json_object_iterator.h File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
@@ -18,7 +18,7 @@
|
||||
<tr style="height: 56px;">
|
||||
<td style="padding-left: 0.5em;">
|
||||
<div id="projectname">json-c
|
||||
 <span id="projectnumber">0.12</span>
|
||||
 <span id="projectnumber">0.12.1</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -26,7 +26,7 @@
|
||||
</table>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.8.5 -->
|
||||
<!-- Generated by Doxygen 1.8.9.1 -->
|
||||
<div id="navrow1" class="tabs">
|
||||
<ul class="tablist">
|
||||
<li><a href="index.html"><span>Main Page</span></a></li>
|
||||
@@ -80,10 +80,9 @@ Functions</h2></td></tr>
|
||||
<div class="textblock"><p>json-c forces clients to use its private data structures for JSON Object iteration. This API corrects that by abstracting the private json-c details. </p>
|
||||
<p>Copyright (c) 2009-2012 Hewlett-Packard Development Company, L.P.</p>
|
||||
<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>
|
||||
<p>API attributes: <br/>
|
||||
</p>
|
||||
<ul>
|
||||
<li>Thread-safe: NO<br/>
|
||||
<p>API attributes: <br />
|
||||
</p><ul>
|
||||
<li>Thread-safe: NO<br />
|
||||
</li>
|
||||
<li>Reentrant: NO </li>
|
||||
</ul>
|
||||
@@ -110,21 +109,19 @@ Functions</h2></td></tr>
|
||||
</dd>
|
||||
</dl>
|
||||
<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>
|
||||
<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>
|
||||
<div class="line">* <span class="keyword">struct </span><a class="code" href="structjson__object__iterator.html">json_object_iterator</a> itEnd;</div>
|
||||
<div class="line">* <span class="keyword">struct </span><a class="code" href="structjson__object.html">json_object</a>* obj;</div>
|
||||
<div class="line">*</div>
|
||||
<div class="line">* obj = <a class="code" href="json__tokener_8h.html#abf031fdf1e5caab71e2225a99588c6bb">json_tokener_parse</a>(<span class="stringliteral">"{'first':'george', 'age':100}"</span>);</div>
|
||||
<div class="line">* it = <a class="code" href="json__object__iterator_8h.html#a925eb97b5aa5b64986a0f663f53cf0fa">json_object_iter_begin</a>(obj);</div>
|
||||
<div class="line">* itEnd = <a class="code" href="json__object__iterator_8h.html#a1fa3784395fb14496e3f1a1633028fd4">json_object_iter_end</a>(obj);</div>
|
||||
<div class="line">*</div>
|
||||
<div class="line">* <span class="keywordflow">while</span> (!<a class="code" href="json__object__iterator_8h.html#a878ca25f72b339882aa2607ac938e79c">json_object_iter_equal</a>(&it, &itEnd)) {</div>
|
||||
<div class="line">* printf(<span class="stringliteral">"%s\n"</span>,</div>
|
||||
<div class="line">* <a class="code" href="json__object__iterator_8h.html#af17775b9b812a4206a84e4d3fb5774ab">json_object_iter_peek_name</a>(&it));</div>
|
||||
<div class="line">* <a class="code" href="json__object__iterator_8h.html#aa98a310c340f6d9b4eeecb673aa5e240">json_object_iter_next</a>(&it);</div>
|
||||
<div class="line">* }</div>
|
||||
<div class="line">*</div>
|
||||
<div class="line">* </div>
|
||||
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> struct json_object_iterator it;</div>
|
||||
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> struct json_object_iterator itEnd;</div>
|
||||
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span> struct json_object* obj;</div>
|
||||
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span> </div>
|
||||
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span> obj = json_tokener_parse("{'first':'george', 'age':100}");</div>
|
||||
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span> it = json_object_iter_begin(obj);</div>
|
||||
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span> itEnd = json_object_iter_end(obj);</div>
|
||||
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span> </div>
|
||||
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span> while (!json_object_iter_equal(&it, &itEnd)) {</div>
|
||||
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>  printf("%s\n",</div>
|
||||
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>  json_object_iter_peek_name(&it));</div>
|
||||
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>  json_object_iter_next(&it);</div>
|
||||
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span> }</div>
|
||||
</div><!-- fragment -->
|
||||
</div>
|
||||
</div>
|
||||
@@ -208,9 +205,8 @@ For performance reasons, memorize the "end" iterator prior to any loop.</dd></dl
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<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>
|
||||
<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#af30f56ca510d59da42e5592f9a436c10">json_object_iter_init_default</a>();</div>
|
||||
<div class="line">* MyClass() : iter_(<a class="code" href="json__object__iterator_8h.html#af30f56ca510d59da42e5592f9a436c10">json_object_iter_init_default</a>())</div>
|
||||
<div class="line">* </div>
|
||||
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> struct json_object_iterator iter = json_object_iter_init_default();</div>
|
||||
<div class="line"><a name="l00002"></a><span class="lineno"> 2</span> MyClass() : iter_(json_object_iter_init_default())</div>
|
||||
</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>
|
||||
<dd>
|
||||
User and internal code MUST NOT make any assumptions about and dependencies on the value of the "default" iterator value.</dd></dl>
|
||||
@@ -295,9 +291,9 @@ User and internal code MUST NOT make any assumptions about and dependencies on t
|
||||
</div><!-- contents -->
|
||||
<!-- start footer part -->
|
||||
<hr class="footer"/><address class="footer"><small>
|
||||
Generated on Thu Apr 10 2014 02:15:05 for json-c by  <a href="http://www.doxygen.org/index.html">
|
||||
Generated on Tue Jun 7 2016 00:47:50 for json-c by  <a href="http://www.doxygen.org/index.html">
|
||||
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||||
</a> 1.8.5
|
||||
</a> 1.8.9.1
|
||||
</small></address>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user