Initial Import
[profile/ivi/json-glib.git] / doc / reference / html / JsonPath.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>JsonPath</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.76.1">
7 <link rel="home" href="index.html" title="JSON-GLib Reference Manual">
8 <link rel="up" href="ch02.html" title="Parser">
9 <link rel="prev" href="JsonReader.html" title="JsonReader">
10 <link rel="next" href="ch03.html" title="Generator">
11 <meta name="generator" content="GTK-Doc V1.18.1 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
16 <tr valign="middle">
17 <td><a accesskey="p" href="JsonReader.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
18 <td><a accesskey="u" href="ch02.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
19 <td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
20 <th width="100%" align="center">JSON-GLib Reference Manual</th>
21 <td><a accesskey="n" href="ch03.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
22 </tr>
23 <tr><td colspan="5" class="shortcuts">
24 <a href="#JsonPath.synopsis" class="shortcut">Top</a>
25                    | 
26                   <a href="#JsonPath.description" class="shortcut">Description</a>
27                    | 
28                   <a href="#JsonPath.object-hierarchy" class="shortcut">Object Hierarchy</a>
29 </td></tr>
30 </table>
31 <div class="refentry">
32 <a name="JsonPath"></a><div class="titlepage"></div>
33 <div class="refnamediv"><table width="100%"><tr>
34 <td valign="top">
35 <h2><span class="refentrytitle"><a name="JsonPath.top_of_page"></a>JsonPath</span></h2>
36 <p>JsonPath — JSONPath implementation</p>
37 </td>
38 <td valign="top" align="right"></td>
39 </tr></table></div>
40 <div class="refsynopsisdiv">
41 <a name="JsonPath.synopsis"></a><h2>Synopsis</h2>
42 <pre class="synopsis">                    <a class="link" href="JsonPath.html#JsonPath-struct" title="JsonPath">JsonPath</a>;
43                     <a class="link" href="JsonPath.html#JsonPathClass" title="JsonPathClass">JsonPathClass</a>;
44 <a class="link" href="JsonPath.html" title="JsonPath"><span class="returnvalue">JsonPath</span></a> *          <a class="link" href="JsonPath.html#json-path-new" title="json_path_new ()">json_path_new</a>                       (<em class="parameter"><code><span class="type">void</span></code></em>);
45 #define             <a class="link" href="JsonPath.html#JSON-PATH-ERROR:CAPS" title="JSON_PATH_ERROR">JSON_PATH_ERROR</a>
46 enum                <a class="link" href="JsonPath.html#JsonPathError" title="enum JsonPathError">JsonPathError</a>;
47 <span class="returnvalue">gboolean</span>            <a class="link" href="JsonPath.html#json-path-compile" title="json_path_compile ()">json_path_compile</a>                   (<em class="parameter"><code><a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> *path</code></em>,
48                                                          <em class="parameter"><code>const <span class="type">char</span> *expression</code></em>,
49                                                          <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
50 <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="returnvalue">JsonNode</span></a> *          <a class="link" href="JsonPath.html#json-path-match" title="json_path_match ()">json_path_match</a>                     (<em class="parameter"><code><a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> *path</code></em>,
51                                                          <em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a> *root</code></em>);
52
53 <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="returnvalue">JsonNode</span></a> *          <a class="link" href="JsonPath.html#json-path-query" title="json_path_query ()">json_path_query</a>                     (<em class="parameter"><code>const <span class="type">char</span> *expression</code></em>,
54                                                          <em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a> *root</code></em>,
55                                                          <em class="parameter"><code><span class="type">GError</span> **error</code></em>);
56 </pre>
57 </div>
58 <div class="refsect1">
59 <a name="JsonPath.object-hierarchy"></a><h2>Object Hierarchy</h2>
60 <pre class="synopsis">
61   GObject
62    +----JsonPath
63 </pre>
64 </div>
65 <div class="refsect1">
66 <a name="JsonPath.description"></a><h2>Description</h2>
67 <p>
68 <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> is a simple class implementing the JSONPath syntax for extracting
69 data out of a JSON tree. While the semantics of the JSONPath expressions are
70 heavily borrowed by the XPath specification for XML, the syntax follows the
71 ECMAScript origins of JSON.
72 </p>
73 <p>
74 Once a <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> instance has been created, it has to compile a JSONPath
75 expression using <a class="link" href="JsonPath.html#json-path-compile" title="json_path_compile ()"><code class="function">json_path_compile()</code></a> before being able to match it to a
76 JSON tree; the same <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> instance can be used to match multiple JSON
77 trees. It it also possible to compile a new JSONPath expression using the
78 same <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> instance; the previous expression will be discarded only if
79 the compilation of the new expression is successful.
80 </p>
81 <p>
82 The simple convenience function <a class="link" href="JsonPath.html#json-path-query" title="json_path_query ()"><code class="function">json_path_query()</code></a> can be used for one-off
83 matching.
84 </p>
85 <p>
86 </p>
87 <div class="refsect2">
88 <a name="json-path-syntax"></a><h3>Syntax of the JSONPath expressions</h3>
89 <p>A JSONPath expression is composed by path indices and operators.
90   Each path index can either be a member name or an element index inside
91   a JSON tree. A JSONPath expression must start with the '$' operator; each
92   path index is separated using either the dot notation or the bracket
93   notation, e.g.:</p>
94 <div class="informalexample">
95   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
96     <tbody>
97       <tr>
98         <td class="listing_lines" align="right"><pre>1
99 2
100 3
101 4</pre></td>
102         <td class="listing_code"><pre class="programlisting"><span class="comment">/* dot notation */</span>
103 <span class="normal">$</span><span class="symbol">.</span><span class="normal">store</span><span class="symbol">.</span><span class="normal">book</span><span class="symbol">[</span><span class="number">0</span><span class="symbol">].</span><span class="normal">title</span>
104 <span class="comment">/* bracket notation */</span>
105 <span class="normal">$</span><span class="symbol">[</span><span class="string">'store'</span><span class="symbol">][</span><span class="string">'book'</span><span class="symbol">][</span><span class="number">0</span><span class="symbol">][</span><span class="string">'title'</span><span class="symbol">]</span></pre></td>
106       </tr>
107     </tbody>
108   </table>
109 </div>
110
111 <p>The available operators are:</p>
112 <div class="table">
113 <a name="json-path-operators"></a><p class="title"><b>Table 1. Operators</b></p>
114 <div class="table-contents"><table summary="Operators" border="1">
115 <colgroup>
116 <col>
117 <col>
118 <col>
119 <col>
120 </colgroup>
121 <thead><tr>
122 <th>Operator</th>
123 <th>Description</th>
124 <th>Example</th>
125 <th>Results</th>
126 </tr></thead>
127 <tbody>
128 <tr>
129 <td>$</td>
130 <td>The root node</td>
131 <td>$</td>
132 <td>The whole document</td>
133 </tr>
134 <tr>
135 <td>. or []</td>
136 <td>The child member or element</td>
137 <td>$.store.book</td>
138 <td>The contents of the book member of the store object</td>
139 </tr>
140 <tr>
141 <td>..</td>
142 <td>Recursive descent</td>
143 <td>$..author</td>
144 <td>The content of the author member in every object</td>
145 </tr>
146 <tr>
147 <td>*</td>
148 <td>Wildcard</td>
149 <td>$.store.book[*].author</td>
150 <td>The content of the author member of any object of the
151           array contained in the book member of the store object</td>
152 </tr>
153 <tr>
154 <td>[]</td>
155 <td>Subscript</td>
156 <td>$.store.book[0]</td>
157 <td>The first element of the array contained in the book
158           member of the store object</td>
159 </tr>
160 <tr>
161 <td>[,]</td>
162 <td>Set</td>
163 <td>$.store.book[0,1]</td>
164 <td>The first two elements of the array contained in the
165           book member of the store object</td>
166 </tr>
167 <tr>
168 <td>[start:end:step]</td>
169 <td>Slice</td>
170 <td>$.store.book[:2]</td>
171 <td>The first two elements of the array contained in the
172           book member of the store object; the start and step are omitted
173           and implied to be 0 and 1, respectively</td>
174 </tr>
175 </tbody>
176 </table></div>
177 </div>
178 <br class="table-break"><p>More information about JSONPath is available on Stefan Gössner's
179   <a class="ulink" href="http://goessner.net/articles/JsonPath/" target="_top">website</a>.</p>
180 </div>
181 <p>
182 </p>
183 <p>
184 </p>
185 <div class="example">
186 <a name="json-path-example"></a><p class="title"><b>Example 1. Example of JsonPath usage</b></p>
187 <div class="example-contents">
188 <p>The following example shows some of the results of using <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a>
189   on a JSON tree. We use the following JSON description of a
190   bookstore:</p>
191 <pre class="programlisting">
192 { "store": {
193     "book": [
194       { "category": "reference",
195         "author": "Nigel Rees",
196         "title": "Sayings of the Century",
197         "price": "8.95"
198       },
199       { "category": "fiction",
200         "author": "Evelyn Waugh",
201         "title": "Sword of Honour",
202         "price": "12.99"
203       },
204       { "category": "fiction",
205         "author": "Herman Melville",
206         "title": "Moby Dick",
207         "isbn": "0-553-21311-3",
208         "price": "8.99"
209       },
210       { "category": "fiction",
211         "author": "J. R. R. Tolkien",
212         "title": "The Lord of the Rings",
213         "isbn": "0-395-19395-8",
214         "price": "22.99"
215       }
216     ],
217     "bicycle": {
218       "color": "red",
219       "price": "19.95"
220     }
221   }
222 }
223 </pre>
224 <p>We can parse the JSON using <a class="link" href="JsonParser.html" title="JsonParser"><span class="type">JsonParser</span></a>:</p>
225 <pre class="programlisting">
226 JsonParser *parser = json_parser_new ();
227 json_parser_load_from_data (parser, json_data, -1, NULL);
228   </pre>
229 <p>If we run the following code:</p>
230 <pre class="programlisting">
231 JsonNode *result;
232 JsonPath *path = json_path_new ();
233 json_path_compile (path, "$.store..author", NULL);
234 result = json_path_match (path, json_parser_get_root (parser));
235   </pre>
236 <p>The <span class="emphasis"><em>result</em></span> <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a> will contain an array
237   with all values of the <span class="emphasis"><em>author</em></span> member of the objects
238   in the JSON tree. If we use a <a class="link" href="JsonGenerator.html" title="JsonGenerator"><span class="type">JsonGenerator</span></a> to convert the <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a>
239   to a string and print it:</p>
240 <pre class="programlisting">
241 JsonGenerator *generator = json_generator_new ();
242 char *str;
243 json_generator_set_pretty (generator, TRUE);
244 json_generator_set_root (generator, result);
245 str = json_generator_to_data (generator, NULL);
246 g_print ("Results: %s\n", str);
247   </pre>
248 <p>The output will be:</p>
249 <pre class="programlisting">
250 [
251   "Nigel Rees",
252   "Evelyn Waugh",
253   "Herman Melville",
254   "J. R. R. Tolkien"
255 ]
256 </pre>
257 </div>
258 </div>
259 <p><br class="example-break">
260 </p>
261 <p>
262 <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> is available since JSON-GLib 0.14
263 </p>
264 </div>
265 <div class="refsect1">
266 <a name="JsonPath.details"></a><h2>Details</h2>
267 <div class="refsect2">
268 <a name="JsonPath-struct"></a><h3>JsonPath</h3>
269 <pre class="programlisting">typedef struct _JsonPath JsonPath;</pre>
270 <p>
271 The <span class="structname">JsonPath</span> structure is an opaque object
272 whose members cannot be directly accessed except through the provided
273 API.
274 </p>
275 <p class="since">Since 0.14</p>
276 </div>
277 <hr>
278 <div class="refsect2">
279 <a name="JsonPathClass"></a><h3>JsonPathClass</h3>
280 <pre class="programlisting">typedef struct _JsonPathClass JsonPathClass;</pre>
281 <p>
282 The <span class="structname">JsonPathClass</span> structure is an opaque
283 object class whose members cannot be directly accessed.
284 </p>
285 <p class="since">Since 0.14</p>
286 </div>
287 <hr>
288 <div class="refsect2">
289 <a name="json-path-new"></a><h3>json_path_new ()</h3>
290 <pre class="programlisting"><a class="link" href="JsonPath.html" title="JsonPath"><span class="returnvalue">JsonPath</span></a> *          json_path_new                       (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
291 <p>
292 Creates a new <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> instance.
293 </p>
294 <p>
295 Once created, the <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> object should be used with <a class="link" href="JsonPath.html#json-path-compile" title="json_path_compile ()"><code class="function">json_path_compile()</code></a>
296 and <a class="link" href="JsonPath.html#json-path-match" title="json_path_match ()"><code class="function">json_path_match()</code></a>.
297 </p>
298 <div class="variablelist"><table border="0">
299 <col align="left" valign="top">
300 <tbody><tr>
301 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
302 <td>the newly created <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> instance. Use
303 <code class="function">g_object_unref()</code> to free the allocated resources when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
304 </td>
305 </tr></tbody>
306 </table></div>
307 <p class="since">Since 0.14</p>
308 </div>
309 <hr>
310 <div class="refsect2">
311 <a name="JSON-PATH-ERROR:CAPS"></a><h3>JSON_PATH_ERROR</h3>
312 <pre class="programlisting">#define JSON_PATH_ERROR         (json_path_error_quark ())
313 </pre>
314 <p>
315 Error domain for <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> errors
316 </p>
317 <p class="since">Since 0.14</p>
318 </div>
319 <hr>
320 <div class="refsect2">
321 <a name="JsonPathError"></a><h3>enum JsonPathError</h3>
322 <pre class="programlisting">typedef enum {
323   JSON_PATH_ERROR_INVALID_QUERY
324 } JsonPathError;
325 </pre>
326 <p>
327 Error code enumeration for the <a class="link" href="JsonPath.html#JSON-PATH-ERROR:CAPS" title="JSON_PATH_ERROR"><code class="literal">JSON_PATH_ERROR</code></a> domain.
328 </p>
329 <div class="variablelist"><table border="0">
330 <col align="left" valign="top">
331 <tbody><tr>
332 <td><p><a name="JSON-PATH-ERROR-INVALID-QUERY:CAPS"></a><span class="term"><code class="literal">JSON_PATH_ERROR_INVALID_QUERY</code></span></p></td>
333 <td>Invalid query
334 </td>
335 </tr></tbody>
336 </table></div>
337 <p class="since">Since 0.14</p>
338 </div>
339 <hr>
340 <div class="refsect2">
341 <a name="json-path-compile"></a><h3>json_path_compile ()</h3>
342 <pre class="programlisting"><span class="returnvalue">gboolean</span>            json_path_compile                   (<em class="parameter"><code><a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> *path</code></em>,
343                                                          <em class="parameter"><code>const <span class="type">char</span> *expression</code></em>,
344                                                          <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
345 <p>
346 Validates and decomposes <em class="parameter"><code>expression</code></em>.
347 </p>
348 <p>
349 A JSONPath expression must be compiled before calling <a class="link" href="JsonPath.html#json-path-match" title="json_path_match ()"><code class="function">json_path_match()</code></a>.
350 </p>
351 <div class="variablelist"><table border="0">
352 <col align="left" valign="top">
353 <tbody>
354 <tr>
355 <td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
356 <td>a <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a>
357 </td>
358 </tr>
359 <tr>
360 <td><p><span class="term"><em class="parameter"><code>expression</code></em> :</span></p></td>
361 <td>a JSONPath expression</td>
362 </tr>
363 <tr>
364 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
365 <td>return location for a <span class="type">GError</span>, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
366 </td>
367 </tr>
368 <tr>
369 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
370 <td>
371 <code class="literal">TRUE</code> on success; on error, <em class="parameter"><code>error</code></em> will be set with
372 the <a class="link" href="JsonPath.html#JSON-PATH-ERROR:CAPS" title="JSON_PATH_ERROR"><code class="literal">JSON_PATH_ERROR</code></a> domain and a code from the <a class="link" href="JsonPath.html#JsonPathError" title="enum JsonPathError"><span class="type">JsonPathError</span></a>
373 enumeration, and <code class="literal">FALSE</code> will be returned</td>
374 </tr>
375 </tbody>
376 </table></div>
377 <p class="since">Since 0.14</p>
378 </div>
379 <hr>
380 <div class="refsect2">
381 <a name="json-path-match"></a><h3>json_path_match ()</h3>
382 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="returnvalue">JsonNode</span></a> *          json_path_match                     (<em class="parameter"><code><a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> *path</code></em>,
383                                                          <em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a> *root</code></em>);</pre>
384 <p>
385 Matches the JSON tree pointed by <em class="parameter"><code>root</code></em> using the expression compiled
386 into the <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a>.
387 </p>
388 <p>
389 The matching <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a>s will be copied into a <a class="link" href="json-glib-JSON-Array.html#JsonArray" title="JsonArray"><span class="type">JsonArray</span></a> and
390 returned wrapped in a <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a>.
391 </p>
392 <div class="variablelist"><table border="0">
393 <col align="left" valign="top">
394 <tbody>
395 <tr>
396 <td><p><span class="term"><em class="parameter"><code>path</code></em> :</span></p></td>
397 <td>a compiled <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a>
398 </td>
399 </tr>
400 <tr>
401 <td><p><span class="term"><em class="parameter"><code>root</code></em> :</span></p></td>
402 <td>a <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a>
403 </td>
404 </tr>
405 <tr>
406 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
407 <td>a newly-created <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a> of type
408 <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-ARRAY:CAPS"><code class="literal">JSON_NODE_ARRAY</code></a> containing an array of matching <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a>s.
409 Use <a class="link" href="json-glib-JSON-Node.html#json-node-free" title="json_node_free ()"><code class="function">json_node_free()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
410 </td>
411 </tr>
412 </tbody>
413 </table></div>
414 <p class="since">Since 0.14</p>
415 </div>
416 <hr>
417 <div class="refsect2">
418 <a name="json-path-query"></a><h3>json_path_query ()</h3>
419 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="returnvalue">JsonNode</span></a> *          json_path_query                     (<em class="parameter"><code>const <span class="type">char</span> *expression</code></em>,
420                                                          <em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a> *root</code></em>,
421                                                          <em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
422 <p>
423 Queries a JSON tree using a JSONPath expression.
424 </p>
425 <p>
426 This function is a simple wrapper around <a class="link" href="JsonPath.html#json-path-new" title="json_path_new ()"><code class="function">json_path_new()</code></a>,
427 <a class="link" href="JsonPath.html#json-path-compile" title="json_path_compile ()"><code class="function">json_path_compile()</code></a> and <a class="link" href="JsonPath.html#json-path-match" title="json_path_match ()"><code class="function">json_path_match()</code></a>. It implicitly
428 creates a <a class="link" href="JsonPath.html" title="JsonPath"><span class="type">JsonPath</span></a> instance, compiles <em class="parameter"><code>expression</code></em> and
429 matches it against the JSON tree pointed by <em class="parameter"><code>root</code></em>.
430 </p>
431 <div class="variablelist"><table border="0">
432 <col align="left" valign="top">
433 <tbody>
434 <tr>
435 <td><p><span class="term"><em class="parameter"><code>expression</code></em> :</span></p></td>
436 <td>a JSONPath expression</td>
437 </tr>
438 <tr>
439 <td><p><span class="term"><em class="parameter"><code>root</code></em> :</span></p></td>
440 <td>the root of a JSON tree</td>
441 </tr>
442 <tr>
443 <td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
444 <td>return location for a <span class="type">GError</span>, or <a href="/home/ebassi/gnome3/install/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL--CAPS"><code class="literal">NULL</code></a>
445 </td>
446 </tr>
447 <tr>
448 <td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
449 <td>a newly-created <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a> of type
450 <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-ARRAY:CAPS"><code class="literal">JSON_NODE_ARRAY</code></a> containing an array of matching <a class="link" href="json-glib-JSON-Node.html#JsonNode" title="JsonNode"><span class="type">JsonNode</span></a>s.
451 Use <a class="link" href="json-glib-JSON-Node.html#json-node-free" title="json_node_free ()"><code class="function">json_node_free()</code></a> when done. <span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span>
452 </td>
453 </tr>
454 </tbody>
455 </table></div>
456 <p class="since">Since 0.14</p>
457 </div>
458 </div>
459 </div>
460 <div class="footer">
461 <hr>
462           Generated by GTK-Doc V1.18.1</div>
463 </body>
464 </html>