Update docs for the 0.13.1 release.

This commit is contained in:
Eric Haszlakiewicz
2018-03-05 23:18:59 -05:00
parent 991e128df5
commit 985c46fec3
77 changed files with 2513 additions and 2185 deletions

View File

@@ -3,8 +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.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta name="generator" content="Doxygen 1.8.8"/>
<title>json-c: `json-c`</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
@@ -17,9 +16,9 @@
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<td style="padding-left: 0.5em;">
<div id="projectname">json-c
&#160;<span id="projectnumber">0.13</span>
&#160;<span id="projectnumber">0.13.1</span>
</div>
</td>
</tr>
@@ -27,15 +26,15 @@
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
<!-- Generated by Doxygen 1.8.8 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li class="current"><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
@@ -53,11 +52,11 @@ $(function() {
<h2>JSON-C - A JSON implementation in C <a class="anchor" id="overview"></a> </h2>
<p>Build Status</p><ul>
<li><a href="https://ci.appveyor.com/project/hawicz/json-c">AppVeyor Build</a> <div class="image">
<img src="https://ci.appveyor.com/api/projects/status/github/json-c/json-c?branch=master&svg=true" alt="AppVeyor Build Status"/>
<img src="https://ci.appveyor.com/api/projects/status/github/json-c/json-c?branch=master&svg=true" alt="AppVeyor Build Status"/>
</div>
</li>
<li><a href="https://travis-ci.org/json-c/json-c">Travis Build</a> <div class="image">
<img src="https://travis-ci.org/json-c/json-c.svg?branch=master" alt="Travis Build Status"/>
<img src="https://travis-ci.org/json-c/json-c.svg?branch=master" alt="Travis Build Status"/>
</div>
</li>
</ul>
@@ -81,21 +80,34 @@ $(function() {
</ul>
<h3>Build instructions:</h3>
<p><code>json-c</code> GitHub repo: <a href="https://github.com/json-c/json-c">https://github.com/json-c/json-c</a></p>
<div class="fragment"><div class="line">$ git clone https://github.com/json-c/json-c.git</div><div class="line">$ cd json-c</div><div class="line">$ sh autogen.sh</div></div><!-- fragment --><p>followed by</p>
<div class="fragment"><div class="line">$ ./configure # --enable-threading</div><div class="line">$ make</div><div class="line">$ make install</div></div><!-- fragment --><p>To build and run the test programs:</p>
<div class="fragment"><div class="line">$ make check</div><div class="line">$ make USE_VALGRIND=0 check # optionally skip using valgrind</div></div><!-- fragment --><h2>Install prerequisites <a class="anchor" id="installprereq"></a> </h2>
<p>```sh $ git clone <a href="https://github.com/json-c/json-c.git">https://github.com/json-c/json-c.git</a> $ cd json-c $ sh autogen.sh ```</p>
<p>followed by</p>
<p>```sh $ ./configure # &ndash;enable-threading $ make $ make install ```</p>
<p>To build and run the test programs:</p>
<p>```sh $ make check $ make USE_VALGRIND=0 check # optionally skip using valgrind ```</p>
<h2>Install prerequisites <a class="anchor" id="installprereq"></a> </h2>
<p>If you are on a relatively modern system, you'll likely be able to install the prerequisites using your OS's packaging system.</p>
<p>### Install using apt (e.g. Ubuntu 16.04.2 LTS) </p><div class="fragment"><div class="line">sudo apt install git</div><div class="line">sudo apt install autoconf automake libtool</div><div class="line">sudo apt install valgrind # optional</div></div><!-- fragment --><p>Then start from the "git clone" command, above.</p>
<h3>Install using apt (e.g. Ubuntu 16.04.2 LTS)</h3>
<p>```sh sudo apt install git sudo apt install autoconf automake libtool sudo apt install valgrind # optional ```</p>
<p>Then start from the "git clone" command, above.</p>
<h3>Manually install and build autoconf, automake and libtool</h3>
<p>For older OS's that don't have up-to-date version of the packages will require a bit more work. For example, CentOS release 5.11, etc...</p>
<div class="fragment"><div class="line">curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz</div><div class="line">curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz</div><div class="line">curl -O http://ftp.gnu.org/gnu/libtool/libtool-2.2.6b.tar.gz</div><div class="line"></div><div class="line">tar xzf autoconf-2.69.tar.gz</div><div class="line">tar xzf automake-1.15.tar.gz</div><div class="line">tar xzf libtool-2.2.6b.tar.gz</div><div class="line"></div><div class="line">export PATH=${HOME}/ac_install/bin:$PATH</div><div class="line"></div><div class="line">(cd autoconf-2.69 &amp;&amp; \</div><div class="line"> ./configure --prefix ${HOME}/ac_install &amp;&amp; \</div><div class="line"> make &amp;&amp; \</div><div class="line"> make install)</div><div class="line"></div><div class="line">(cd automake-1.15 &amp;&amp; \</div><div class="line"> ./configure --prefix ${HOME}/ac_install &amp;&amp; \</div><div class="line"> make &amp;&amp; \</div><div class="line"> make install)</div><div class="line"></div><div class="line">(cd libtool-2.2.6b &amp;&amp; \</div><div class="line"> ./configure --prefix ${HOME}/ac_install &amp;&amp; \</div><div class="line"> make &amp;&amp; \</div><div class="line"> make install)</div></div><!-- fragment --><h2>Building with partial threading support <a class="anchor" id="buildthreaded"></a> </h2>
<p>```sh curl -O <a href="http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz">http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz</a> curl -O <a href="http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz">http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz</a> curl -O <a href="http://ftp.gnu.org/gnu/libtool/libtool-2.2.6b.tar.gz">http://ftp.gnu.org/gnu/libtool/libtool-2.2.6b.tar.gz</a></p>
<p>tar xzf autoconf-2.69.tar.gz tar xzf automake-1.15.tar.gz tar xzf libtool-2.2.6b.tar.gz</p>
<p>export PATH=${HOME}/ac_install/bin:$PATH</p>
<p>(cd autoconf-2.69 &amp;&amp; \ ./configure &ndash;prefix ${HOME}/ac_install &amp;&amp; \ make &amp;&amp; \ make install)</p>
<p>(cd automake-1.15 &amp;&amp; \ ./configure &ndash;prefix ${HOME}/ac_install &amp;&amp; \ make &amp;&amp; \ make install)</p>
<p>(cd libtool-2.2.6b &amp;&amp; \ ./configure &ndash;prefix ${HOME}/ac_install &amp;&amp; \ make &amp;&amp; \ make install) ```</p>
<h2>Building with partial threading support <a class="anchor" id="buildthreaded"></a> </h2>
<p>Although json-c does not support fully multi-threaded access to object trees, it has some code to help make use in threaded programs a bit safer. Currently, this is limited to using atomic operations for <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>.</p>
<p>Since this may have a performance impact, of at least 3x slower according to <a href="https://stackoverflow.com/a/11609063,">https://stackoverflow.com/a/11609063,</a> it is disabled by default. You may turn it on by adjusting your configure command with: &ndash;enable-threading</p>
<p>Separately, the default hash function used for object field keys, lh_char_hash, uses a compare-and-swap operation to ensure the randomly seed is only generated once. Because this is a one-time operation, it is always compiled in when the compare-and-swap operation is available.</p>
<h2>Linking to <code>libjson-c</code> <a class="anchor" id="linking"></a> </h2>
<p>If your system has <code>pkgconfig</code>, then you can just add this to your <code>makefile</code>:</p>
<div class="fragment"><div class="line">CFLAGS += $(shell pkg-config --cflags json-c)</div><div class="line">LDFLAGS += $(shell pkg-config --libs json-c)</div></div><!-- fragment --><p>Without <code>pkgconfig</code>, you would do something like this:</p>
<div class="fragment"><div class="line">JSON_C_DIR=/path/to/json_c/install</div><div class="line">CFLAGS += -I$(JSON_C_DIR)/include/json-c</div><div class="line">LDFLAGS+= -L$(JSON_C_DIR)/lib -ljson-c</div></div><!-- fragment --><h2>Using json-c <a class="anchor" id="using"></a> </h2>
<p>```make CFLAGS += $(shell pkg-config &ndash;cflags json-c) LDFLAGS += $(shell pkg-config &ndash;libs json-c) ```</p>
<p>Without <code>pkgconfig</code>, you would do something like this:</p>
<p>```make JSON_C_DIR=/path/to/json_c/install CFLAGS += -I/include/json-c LDFLAGS+= -L/lib -ljson-c ```</p>
<h2>Using json-c <a class="anchor" id="using"></a> </h2>
<p>To use json-c you can either include <a class="el" href="json_8h.html" title="A convenience header that may be included instead of other individual ones. ">json.h</a>, or preferrably, one of the following more specific header files:</p>
<ul>
<li><a class="el" href="json__object_8h.html" title="Core json-c API. Start here, or with json_tokener.h. ">json_object.h</a> - Core types and methods.</li>
@@ -109,9 +121,9 @@ $(function() {
</div></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Dec 7 2017 18:06:04 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
Generated on Mon Mar 5 2018 23:17:09 for json-c by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</a> 1.8.8
</small></address>
</body>
</html>