<?xml version="1.0" encoding='ISO-8859-1'?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [

<!-- Include general documentation entities -->
<!ENTITY % docentities SYSTEM "../../../docbook/entities.xml">
%docentities;

]>
<!-- Module User's Guide -->

<chapter>
	<title>&adminguide;</title>
	<section>
	<title>Overview</title>
	<para>
		This module provides operations on json strings.
	</para>
	</section>

	<section>
	<title>Dependencies</title>
	<section>
		<title>&kamailio; Modules</title>
		<para>
		The following modules must be loaded before this module:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>None</emphasis>
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	<section>
		<title>External Libraries or Applications</title>
		<para>
		The following libraries or applications must be installed before running
		&kamailio; with this module loaded:
			<itemizedlist>
			<listitem>
			<para>
				<emphasis>libjson (https://github.com/json-c/json-c/wiki)</emphasis>
			</para>
			</listitem>
			</itemizedlist>
		</para>
	</section>
	</section>

	<section>
	<title>Functions</title>
	<section>
	    <title>
		<function moreinfo="none">json_get_field(json_string, field_name, destination)</function>
	    </title>
	    <para>
		Copy field 'field_name' from json object 'json_string' and store it in pvar 'destination'.
		</para>
		<example>
		<title><function>json_get_field</function> usage</title>
		<programlisting format="linespecific">
...
json_get_field("{'foo':'bar'}", "foo", "$var(foo)");
xlog("foo is $var(foo)");
...
		</programlisting>
	    </example>
	</section>
	</section>
</chapter>

