<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://reviewboard.asterisk.org/r/2264/">https://reviewboard.asterisk.org/r/2264/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 7th, 2013, 3:56 p.m., <b>elguero</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
<thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
<a href="https://reviewboard.asterisk.org/r/2264/diff/1/?file=32588#file32588line30" style="color: black; font-weight: bold; text-decoration: underline;">/contrib/scripts/install_prereq</a>
<span style="font-weight: normal;">
(Diff revision 1)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">30</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">PACKAGES_DEBIAN="$PACKAGES_DEBIAN libresample-dev libc-client-dev binutils-dev libsrtp-dev libgsm1-dev libedit-dev doxygen"</pre></td>
<th bgcolor="#e9eaa8" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">30</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">PACKAGES_DEBIAN="$PACKAGES_DEBIAN libresample-dev libc-client-dev binutils-dev libsrtp-dev libgsm1-dev libedit-dev doxygen<span class="hl"> libjansson-dev</span>"</pre></td>
</tr>
</tbody>
</table>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Is there a Jansson library package for RHEL? I see one in Fedora 17 but I do not seem to find one for CentOS 6 (RHEL 6).
Yet, there is json-c for both Debian and RHEL.
Was there a particular reason why we chose Jansson? I hope I am not rehashing something that was already discussed and a decision was already made. If so, then just ignore me.</pre>
</blockquote>
<p>On January 9th, 2013, 4:52 p.m., <b>David Lee</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I picked Jansson on a recommendation, and its straightforward API. If there was one thing that sold me on Jansson, it was the json_pack[1] function, which is a simple and excellent way to build JSON objects.
I'll look into the availability issue for RHEL. I'm open to using json-c, but not if that means giving up json_pack. I don't immediately see an equivalent in json-c. Do you know of one?
[1]: http://www.digip.org/jansson/doc/2.4/apiref.html#building-values</pre>
</blockquote>
<p>On January 9th, 2013, 9:17 p.m., <b>elguero</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">My main concern is the availability. Other than that, Jansson does look like a very good library.
I looked into json-c for building a JSON object and it doesn't look too bad[1]. I did find some tutorials[2] that gave some simple explanations on how to build JSON objects[3]. I do not quite see an equivalent to json_pack, though.
[1]: http://json-c.github.com/json-c/json-c-0.10/doc/html/json__object_8h.html#a2025bc677c35f130e117dfda5bf1ef73
[2]: https://linuxprograms.wordpress.com/tag/json_object_to_json_string/
[3]: https://linuxprograms.wordpress.com/2010/08/19/json_object_new_object/</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The jansson.spec file from Fedora[1] is very straightforward. It's only build dependency (python-sphinx) is in EL6, so providing Jansson RPM's shouldn't be difficult.
[1]: http://pkgs.fedoraproject.org/cgit/jansson.git/tree/jansson.spec</pre>
<br />
<p>- David</p>
<br />
<p>On January 9th, 2013, 11:26 p.m., David Lee wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://reviewboard.asterisk.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Asterisk Developers.</div>
<div>By David Lee.</div>
<p style="color: grey;"><i>Updated Jan. 9, 2013, 11:26 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This provides a JSON API by pulling in and wrapping the Jansson JSON
library[1]. The Asterisk API basically mirrors the Jansson
functionality, with a few minor tweaks:
* Jansson provides both reference-stealing and reference-borrowing
versions of several API's. The Asterisk API is exclusively
reference-stealing for operations that put elements into arrays and
objects.
* No support for doubles, since we usually don't need that.
* Coming along for the ride is the ast_test_check macro, which makes
it easier to accumulate the results of several operations in a test.
[1]: http://www.digip.org/jansson/</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Behold, extensive unit tests!</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="https://issues.asterisk.org/jira/browse/ASTERISK-20888">ASTERISK-20888</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>/trunk/build_tools/menuselect-deps.in <span style="color: grey">(378906)</span></li>
<li>/trunk/configure.ac <span style="color: grey">(378906)</span></li>
<li>/trunk/contrib/scripts/install_prereq <span style="color: grey">(378906)</span></li>
<li>/trunk/include/asterisk/autoconfig.h.in <span style="color: grey">(378906)</span></li>
<li>/trunk/include/asterisk/json.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/include/asterisk/test.h <span style="color: grey">(378906)</span></li>
<li>/trunk/main/Makefile <span style="color: grey">(378906)</span></li>
<li>/trunk/main/test.c <span style="color: grey">(378906)</span></li>
<li>/trunk/makeopts.in <span style="color: grey">(378906)</span></li>
<li>/trunk/res/res_json.c <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/res/res_json.exports.in <span style="color: grey">(PRE-CREATION)</span></li>
<li>/trunk/tests/test_json.c <span style="color: grey">(PRE-CREATION)</span></li>
</ul>
<p><a href="https://reviewboard.asterisk.org/r/2264/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>