Imported Upstream version 1.2.4
[platform/upstream/json-glib.git] / doc / reference / html / json-glib-JSON-Node.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>JSON Node: JSON-GLib Reference Manual</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="index.html" title="JSON-GLib Reference Manual">
8 <link rel="up" href="ch01.html" title="Data Types">
9 <link rel="prev" href="ch01.html" title="Data Types">
10 <link rel="next" href="json-glib-JSON-Array.html" title="JSON Array">
11 <meta name="generator" content="GTK-Doc V1.25.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="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#json-glib-JSON-Node.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19                   <a href="#json-glib-JSON-Node.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
20 </td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="ch01.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="json-glib-JSON-Array.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 </tr></table>
26 <div class="refentry">
27 <a name="json-glib-JSON-Node"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
30 <h2><span class="refentrytitle"><a name="json-glib-JSON-Node.top_of_page"></a>JSON Node</span></h2>
31 <p>JSON Node — Node in a JSON object model</p>
32 </td>
33 <td class="gallery_image" valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsect1">
36 <a name="json-glib-JSON-Node.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table class="informaltable" width="100%" border="0">
38 <colgroup>
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
41 </colgroup>
42 <tbody>
43 <tr>
44 <td class="define_keyword">#define</td>
45 <td class="function_name">
46 <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-TYPE:CAPS" title="JSON_NODE_TYPE()">JSON_NODE_TYPE</a><span class="c_punctuation">()</span>
47 </td>
48 </tr>
49 <tr>
50 <td class="define_keyword">#define</td>
51 <td class="function_name">
52 <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-HOLDS:CAPS" title="JSON_NODE_HOLDS()">JSON_NODE_HOLDS</a><span class="c_punctuation">()</span>
53 </td>
54 </tr>
55 <tr>
56 <td class="define_keyword">#define</td>
57 <td class="function_name">
58 <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-HOLDS-VALUE:CAPS" title="JSON_NODE_HOLDS_VALUE()">JSON_NODE_HOLDS_VALUE</a><span class="c_punctuation">()</span>
59 </td>
60 </tr>
61 <tr>
62 <td class="define_keyword">#define</td>
63 <td class="function_name">
64 <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-HOLDS-OBJECT:CAPS" title="JSON_NODE_HOLDS_OBJECT()">JSON_NODE_HOLDS_OBJECT</a><span class="c_punctuation">()</span>
65 </td>
66 </tr>
67 <tr>
68 <td class="define_keyword">#define</td>
69 <td class="function_name">
70 <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-HOLDS-ARRAY:CAPS" title="JSON_NODE_HOLDS_ARRAY()">JSON_NODE_HOLDS_ARRAY</a><span class="c_punctuation">()</span>
71 </td>
72 </tr>
73 <tr>
74 <td class="define_keyword">#define</td>
75 <td class="function_name">
76 <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-HOLDS-NULL:CAPS" title="JSON_NODE_HOLDS_NULL()">JSON_NODE_HOLDS_NULL</a><span class="c_punctuation">()</span>
77 </td>
78 </tr>
79 <tr>
80 <td class="function_type">
81 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
82 </td>
83 <td class="function_name">
84 <a class="link" href="json-glib-JSON-Node.html#json-node-alloc" title="json_node_alloc ()">json_node_alloc</a> <span class="c_punctuation">()</span>
85 </td>
86 </tr>
87 <tr>
88 <td class="function_type">
89 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
90 </td>
91 <td class="function_name">
92 <a class="link" href="json-glib-JSON-Node.html#json-node-init" title="json_node_init ()">json_node_init</a> <span class="c_punctuation">()</span>
93 </td>
94 </tr>
95 <tr>
96 <td class="function_type">
97 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
98 </td>
99 <td class="function_name">
100 <a class="link" href="json-glib-JSON-Node.html#json-node-init-int" title="json_node_init_int ()">json_node_init_int</a> <span class="c_punctuation">()</span>
101 </td>
102 </tr>
103 <tr>
104 <td class="function_type">
105 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
106 </td>
107 <td class="function_name">
108 <a class="link" href="json-glib-JSON-Node.html#json-node-init-double" title="json_node_init_double ()">json_node_init_double</a> <span class="c_punctuation">()</span>
109 </td>
110 </tr>
111 <tr>
112 <td class="function_type">
113 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
114 </td>
115 <td class="function_name">
116 <a class="link" href="json-glib-JSON-Node.html#json-node-init-boolean" title="json_node_init_boolean ()">json_node_init_boolean</a> <span class="c_punctuation">()</span>
117 </td>
118 </tr>
119 <tr>
120 <td class="function_type">
121 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
122 </td>
123 <td class="function_name">
124 <a class="link" href="json-glib-JSON-Node.html#json-node-init-string" title="json_node_init_string ()">json_node_init_string</a> <span class="c_punctuation">()</span>
125 </td>
126 </tr>
127 <tr>
128 <td class="function_type">
129 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
130 </td>
131 <td class="function_name">
132 <a class="link" href="json-glib-JSON-Node.html#json-node-init-null" title="json_node_init_null ()">json_node_init_null</a> <span class="c_punctuation">()</span>
133 </td>
134 </tr>
135 <tr>
136 <td class="function_type">
137 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
138 </td>
139 <td class="function_name">
140 <a class="link" href="json-glib-JSON-Node.html#json-node-init-object" title="json_node_init_object ()">json_node_init_object</a> <span class="c_punctuation">()</span>
141 </td>
142 </tr>
143 <tr>
144 <td class="function_type">
145 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
146 </td>
147 <td class="function_name">
148 <a class="link" href="json-glib-JSON-Node.html#json-node-init-array" title="json_node_init_array ()">json_node_init_array</a> <span class="c_punctuation">()</span>
149 </td>
150 </tr>
151 <tr>
152 <td class="function_type">
153 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
154 </td>
155 <td class="function_name">
156 <a class="link" href="json-glib-JSON-Node.html#json-node-new" title="json_node_new ()">json_node_new</a> <span class="c_punctuation">()</span>
157 </td>
158 </tr>
159 <tr>
160 <td class="function_type">
161 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
162 </td>
163 <td class="function_name">
164 <a class="link" href="json-glib-JSON-Node.html#json-node-copy" title="json_node_copy ()">json_node_copy</a> <span class="c_punctuation">()</span>
165 </td>
166 </tr>
167 <tr>
168 <td class="function_type">
169 <span class="returnvalue">void</span>
170 </td>
171 <td class="function_name">
172 <a class="link" href="json-glib-JSON-Node.html#json-node-free" title="json_node_free ()">json_node_free</a> <span class="c_punctuation">()</span>
173 </td>
174 </tr>
175 <tr>
176 <td class="function_type">
177 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
178 </td>
179 <td class="function_name">
180 <a class="link" href="json-glib-JSON-Node.html#json-node-ref" title="json_node_ref ()">json_node_ref</a> <span class="c_punctuation">()</span>
181 </td>
182 </tr>
183 <tr>
184 <td class="function_type">
185 <span class="returnvalue">void</span>
186 </td>
187 <td class="function_name">
188 <a class="link" href="json-glib-JSON-Node.html#json-node-unref" title="json_node_unref ()">json_node_unref</a> <span class="c_punctuation">()</span>
189 </td>
190 </tr>
191 <tr>
192 <td class="function_type">
193 <span class="returnvalue">gboolean</span>
194 </td>
195 <td class="function_name">
196 <a class="link" href="json-glib-JSON-Node.html#json-node-is-immutable" title="json_node_is_immutable ()">json_node_is_immutable</a> <span class="c_punctuation">()</span>
197 </td>
198 </tr>
199 <tr>
200 <td class="function_type">
201 <span class="returnvalue">void</span>
202 </td>
203 <td class="function_name">
204 <a class="link" href="json-glib-JSON-Node.html#json-node-seal" title="json_node_seal ()">json_node_seal</a> <span class="c_punctuation">()</span>
205 </td>
206 </tr>
207 <tr>
208 <td class="function_type">
209 <span class="returnvalue">guint</span>
210 </td>
211 <td class="function_name">
212 <a class="link" href="json-glib-JSON-Node.html#json-node-hash" title="json_node_hash ()">json_node_hash</a> <span class="c_punctuation">()</span>
213 </td>
214 </tr>
215 <tr>
216 <td class="function_type">
217 <span class="returnvalue">gboolean</span>
218 </td>
219 <td class="function_name">
220 <a class="link" href="json-glib-JSON-Node.html#json-node-equal" title="json_node_equal ()">json_node_equal</a> <span class="c_punctuation">()</span>
221 </td>
222 </tr>
223 <tr>
224 <td class="function_type">
225 <span class="returnvalue">void</span>
226 </td>
227 <td class="function_name">
228 <a class="link" href="json-glib-JSON-Node.html#json-node-set-array" title="json_node_set_array ()">json_node_set_array</a> <span class="c_punctuation">()</span>
229 </td>
230 </tr>
231 <tr>
232 <td class="function_type">
233 <span class="returnvalue">void</span>
234 </td>
235 <td class="function_name">
236 <a class="link" href="json-glib-JSON-Node.html#json-node-take-array" title="json_node_take_array ()">json_node_take_array</a> <span class="c_punctuation">()</span>
237 </td>
238 </tr>
239 <tr>
240 <td class="function_type">
241 <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="returnvalue">JsonArray</span></a> *
242 </td>
243 <td class="function_name">
244 <a class="link" href="json-glib-JSON-Node.html#json-node-get-array" title="json_node_get_array ()">json_node_get_array</a> <span class="c_punctuation">()</span>
245 </td>
246 </tr>
247 <tr>
248 <td class="function_type">
249 <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="returnvalue">JsonArray</span></a> *
250 </td>
251 <td class="function_name">
252 <a class="link" href="json-glib-JSON-Node.html#json-node-dup-array" title="json_node_dup_array ()">json_node_dup_array</a> <span class="c_punctuation">()</span>
253 </td>
254 </tr>
255 <tr>
256 <td class="function_type">
257 <span class="returnvalue">void</span>
258 </td>
259 <td class="function_name">
260 <a class="link" href="json-glib-JSON-Node.html#json-node-set-object" title="json_node_set_object ()">json_node_set_object</a> <span class="c_punctuation">()</span>
261 </td>
262 </tr>
263 <tr>
264 <td class="function_type">
265 <span class="returnvalue">void</span>
266 </td>
267 <td class="function_name">
268 <a class="link" href="json-glib-JSON-Node.html#json-node-take-object" title="json_node_take_object ()">json_node_take_object</a> <span class="c_punctuation">()</span>
269 </td>
270 </tr>
271 <tr>
272 <td class="function_type">
273 <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="returnvalue">JsonObject</span></a> *
274 </td>
275 <td class="function_name">
276 <a class="link" href="json-glib-JSON-Node.html#json-node-get-object" title="json_node_get_object ()">json_node_get_object</a> <span class="c_punctuation">()</span>
277 </td>
278 </tr>
279 <tr>
280 <td class="function_type">
281 <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="returnvalue">JsonObject</span></a> *
282 </td>
283 <td class="function_name">
284 <a class="link" href="json-glib-JSON-Node.html#json-node-dup-object" title="json_node_dup_object ()">json_node_dup_object</a> <span class="c_punctuation">()</span>
285 </td>
286 </tr>
287 <tr>
288 <td class="function_type">
289 <span class="returnvalue">void</span>
290 </td>
291 <td class="function_name">
292 <a class="link" href="json-glib-JSON-Node.html#json-node-set-value" title="json_node_set_value ()">json_node_set_value</a> <span class="c_punctuation">()</span>
293 </td>
294 </tr>
295 <tr>
296 <td class="function_type">
297 <span class="returnvalue">void</span>
298 </td>
299 <td class="function_name">
300 <a class="link" href="json-glib-JSON-Node.html#json-node-get-value" title="json_node_get_value ()">json_node_get_value</a> <span class="c_punctuation">()</span>
301 </td>
302 </tr>
303 <tr>
304 <td class="function_type">
305 <span class="returnvalue">void</span>
306 </td>
307 <td class="function_name">
308 <a class="link" href="json-glib-JSON-Node.html#json-node-set-boolean" title="json_node_set_boolean ()">json_node_set_boolean</a> <span class="c_punctuation">()</span>
309 </td>
310 </tr>
311 <tr>
312 <td class="function_type">
313 <span class="returnvalue">gboolean</span>
314 </td>
315 <td class="function_name">
316 <a class="link" href="json-glib-JSON-Node.html#json-node-get-boolean" title="json_node_get_boolean ()">json_node_get_boolean</a> <span class="c_punctuation">()</span>
317 </td>
318 </tr>
319 <tr>
320 <td class="function_type">
321 <span class="returnvalue">void</span>
322 </td>
323 <td class="function_name">
324 <a class="link" href="json-glib-JSON-Node.html#json-node-set-double" title="json_node_set_double ()">json_node_set_double</a> <span class="c_punctuation">()</span>
325 </td>
326 </tr>
327 <tr>
328 <td class="function_type">
329 <span class="returnvalue">gdouble</span>
330 </td>
331 <td class="function_name">
332 <a class="link" href="json-glib-JSON-Node.html#json-node-get-double" title="json_node_get_double ()">json_node_get_double</a> <span class="c_punctuation">()</span>
333 </td>
334 </tr>
335 <tr>
336 <td class="function_type">
337 <span class="returnvalue">void</span>
338 </td>
339 <td class="function_name">
340 <a class="link" href="json-glib-JSON-Node.html#json-node-set-int" title="json_node_set_int ()">json_node_set_int</a> <span class="c_punctuation">()</span>
341 </td>
342 </tr>
343 <tr>
344 <td class="function_type">
345 <span class="returnvalue">gint64</span>
346 </td>
347 <td class="function_name">
348 <a class="link" href="json-glib-JSON-Node.html#json-node-get-int" title="json_node_get_int ()">json_node_get_int</a> <span class="c_punctuation">()</span>
349 </td>
350 </tr>
351 <tr>
352 <td class="function_type">
353 <span class="returnvalue">void</span>
354 </td>
355 <td class="function_name">
356 <a class="link" href="json-glib-JSON-Node.html#json-node-set-string" title="json_node_set_string ()">json_node_set_string</a> <span class="c_punctuation">()</span>
357 </td>
358 </tr>
359 <tr>
360 <td class="function_type">const <span class="returnvalue">gchar</span> *
361 </td>
362 <td class="function_name">
363 <a class="link" href="json-glib-JSON-Node.html#json-node-get-string" title="json_node_get_string ()">json_node_get_string</a> <span class="c_punctuation">()</span>
364 </td>
365 </tr>
366 <tr>
367 <td class="function_type">
368 <span class="returnvalue">gchar</span> *
369 </td>
370 <td class="function_name">
371 <a class="link" href="json-glib-JSON-Node.html#json-node-dup-string" title="json_node_dup_string ()">json_node_dup_string</a> <span class="c_punctuation">()</span>
372 </td>
373 </tr>
374 <tr>
375 <td class="function_type">
376 <span class="returnvalue">void</span>
377 </td>
378 <td class="function_name">
379 <a class="link" href="json-glib-JSON-Node.html#json-node-set-parent" title="json_node_set_parent ()">json_node_set_parent</a> <span class="c_punctuation">()</span>
380 </td>
381 </tr>
382 <tr>
383 <td class="function_type">
384 <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
385 </td>
386 <td class="function_name">
387 <a class="link" href="json-glib-JSON-Node.html#json-node-get-parent" title="json_node_get_parent ()">json_node_get_parent</a> <span class="c_punctuation">()</span>
388 </td>
389 </tr>
390 <tr>
391 <td class="function_type">const <span class="returnvalue">gchar</span> *
392 </td>
393 <td class="function_name">
394 <a class="link" href="json-glib-JSON-Node.html#json-node-type-name" title="json_node_type_name ()">json_node_type_name</a> <span class="c_punctuation">()</span>
395 </td>
396 </tr>
397 <tr>
398 <td class="function_type">
399 <span class="returnvalue">GType</span>
400 </td>
401 <td class="function_name">
402 <a class="link" href="json-glib-JSON-Node.html#json-node-get-value-type" title="json_node_get_value_type ()">json_node_get_value_type</a> <span class="c_punctuation">()</span>
403 </td>
404 </tr>
405 <tr>
406 <td class="function_type">
407 <a class="link" href="json-glib-JSON-Node.html#JsonNodeType" title="enum JsonNodeType"><span class="returnvalue">JsonNodeType</span></a>
408 </td>
409 <td class="function_name">
410 <a class="link" href="json-glib-JSON-Node.html#json-node-get-node-type" title="json_node_get_node_type ()">json_node_get_node_type</a> <span class="c_punctuation">()</span>
411 </td>
412 </tr>
413 <tr>
414 <td class="function_type">
415 <span class="returnvalue">gboolean</span>
416 </td>
417 <td class="function_name">
418 <a class="link" href="json-glib-JSON-Node.html#json-node-is-null" title="json_node_is_null ()">json_node_is_null</a> <span class="c_punctuation">()</span>
419 </td>
420 </tr>
421 <tr>
422 <td class="function_type">
423 <span class="returnvalue">guint</span>
424 </td>
425 <td class="function_name">
426 <a class="link" href="json-glib-JSON-Node.html#json-string-hash" title="json_string_hash ()">json_string_hash</a> <span class="c_punctuation">()</span>
427 </td>
428 </tr>
429 <tr>
430 <td class="function_type">
431 <span class="returnvalue">gboolean</span>
432 </td>
433 <td class="function_name">
434 <a class="link" href="json-glib-JSON-Node.html#json-string-equal" title="json_string_equal ()">json_string_equal</a> <span class="c_punctuation">()</span>
435 </td>
436 </tr>
437 <tr>
438 <td class="function_type">
439 <span class="returnvalue">gint</span>
440 </td>
441 <td class="function_name">
442 <a class="link" href="json-glib-JSON-Node.html#json-string-compare" title="json_string_compare ()">json_string_compare</a> <span class="c_punctuation">()</span>
443 </td>
444 </tr>
445 </tbody>
446 </table></div>
447 </div>
448 <a name="JsonNode"></a><div class="refsect1">
449 <a name="json-glib-JSON-Node.other"></a><h2>Types and Values</h2>
450 <div class="informaltable"><table class="informaltable" width="100%" border="0">
451 <colgroup>
452 <col width="150px" class="name">
453 <col class="description">
454 </colgroup>
455 <tbody>
456 <tr>
457 <td class="datatype_keyword">enum</td>
458 <td class="function_name"><a class="link" href="json-glib-JSON-Node.html#JsonNodeType" title="enum JsonNodeType">JsonNodeType</a></td>
459 </tr>
460 <tr>
461 <td class="datatype_keyword"> </td>
462 <td class="function_name"><a class="link" href="json-glib-JSON-Node.html#JsonNode-struct" title="JsonNode">JsonNode</a></td>
463 </tr>
464 </tbody>
465 </table></div>
466 </div>
467 <div class="refsect1">
468 <a name="json-glib-JSON-Node.object-hierarchy"></a><h2>Object Hierarchy</h2>
469 <pre class="screen">    <a href="/home/ebassi/gnome/install/share/gtk-doc/html/gobject/gobject-Boxed-Types.html">GBoxed</a>
470     <span class="lineart">╰──</span> JsonNode
471 </pre>
472 </div>
473 <div class="refsect1">
474 <a name="json-glib-JSON-Node.description"></a><h2>Description</h2>
475 <p>A <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> is a generic container of elements inside a JSON stream.
476 It can contain fundamental types (integers, booleans, floating point
477 numbers, strings) and complex types (arrays and objects).</p>
478 <p>When parsing a JSON data stream you extract the root node and walk
479 the node tree by retrieving the type of data contained inside the
480 node with the <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-TYPE:CAPS" title="JSON_NODE_TYPE()"><code class="literal">JSON_NODE_TYPE</code></a> macro. If the node contains a fundamental
481 type you can retrieve a copy of the <span class="type">GValue</span> holding it with the
482 <a class="link" href="json-glib-JSON-Node.html#json-node-get-value" title="json_node_get_value ()"><code class="function">json_node_get_value()</code></a> function, and then use the <span class="type">GValue</span> API to extract
483 the data; if the node contains a complex type you can retrieve the
484 <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a> or the <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> using <a class="link" href="json-glib-JSON-Node.html#json-node-get-object" title="json_node_get_object ()"><code class="function">json_node_get_object()</code></a> or
485 <a class="link" href="json-glib-JSON-Node.html#json-node-get-array" title="json_node_get_array ()"><code class="function">json_node_get_array()</code></a> respectively, and then retrieve the nodes
486 they contain.</p>
487 <p>A <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> may be marked as immutable using <a class="link" href="json-glib-JSON-Node.html#json-node-seal" title="json_node_seal ()"><code class="function">json_node_seal()</code></a>. This marks the
488 node and all its descendents as read-only, and means that subsequent calls to
489 setter functions (such as <a class="link" href="json-glib-JSON-Node.html#json-node-set-array" title="json_node_set_array ()"><code class="function">json_node_set_array()</code></a>) on them will abort as a
490 programmer error. By marking a node tree as immutable, it may be referenced
491 in multiple places and its hash value cached for fast lookups, without the
492 possibility of a value deep within the tree changing and affecting hash
493 values. Immutable <a href="json-glib-JSON-Node.html#JsonNode-struct"><span class="type">JsonNodes</span></a> may be passed to functions which retain a
494 reference to them without needing to take a copy.</p>
495 <p><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> supports two types of memory management: alloc/free semantics, and
496 ref/unref semantics. The two may be mixed to a limited extent: nodes may be
497 allocated (which gives them a reference count of 1), referenced zero or more
498 times, unreferenced exactly that number of times (using <a class="link" href="json-glib-JSON-Node.html#json-node-unref" title="json_node_unref ()"><code class="function">json_node_unref()</code></a>),
499 then either unreferenced exactly once more or freed (using <a class="link" href="json-glib-JSON-Node.html#json-node-free" title="json_node_free ()"><code class="function">json_node_free()</code></a>)
500 to destroy them. <a class="link" href="json-glib-JSON-Node.html#json-node-free" title="json_node_free ()"><code class="function">json_node_free()</code></a> must not be used when a node might have a
501 reference count not equal to 1. To this end, json-glib uses <a class="link" href="json-glib-JSON-Node.html#json-node-copy" title="json_node_copy ()"><code class="function">json_node_copy()</code></a>
502 and <a class="link" href="json-glib-JSON-Node.html#json-node-unref" title="json_node_unref ()"><code class="function">json_node_unref()</code></a> internally.</p>
503 </div>
504 <div class="refsect1">
505 <a name="json-glib-JSON-Node.functions_details"></a><h2>Functions</h2>
506 <div class="refsect2">
507 <a name="JSON-NODE-TYPE:CAPS"></a><h3>JSON_NODE_TYPE()</h3>
508 <pre class="programlisting">#define JSON_NODE_TYPE(node)    (json_node_get_node_type ((node)))
509 </pre>
510 <p>Evaluates to the <a class="link" href="json-glib-JSON-Node.html#JsonNodeType" title="enum JsonNodeType"><span class="type">JsonNodeType</span></a> contained by <em class="parameter"><code>node</code></em>
511 </p>
512 <div class="refsect3">
513 <a name="JSON-NODE-TYPE.parameters"></a><h4>Parameters</h4>
514 <div class="informaltable"><table class="informaltable" width="100%" border="0">
515 <colgroup>
516 <col width="150px" class="parameters_name">
517 <col class="parameters_description">
518 <col width="200px" class="parameters_annotations">
519 </colgroup>
520 <tbody><tr>
521 <td class="parameter_name"><p>node</p></td>
522 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
523 <td class="parameter_annotations"> </td>
524 </tr></tbody>
525 </table></div>
526 </div>
527 </div>
528 <hr>
529 <div class="refsect2">
530 <a name="JSON-NODE-HOLDS:CAPS"></a><h3>JSON_NODE_HOLDS()</h3>
531 <pre class="programlisting">#define JSON_NODE_HOLDS(node,t)         (json_node_get_node_type ((node)) == (t))
532 </pre>
533 <p>Evaluates to <code class="literal">TRUE</code> if the <em class="parameter"><code>node</code></em>
534  holds type <em class="parameter"><code>t</code></em>
535 </p>
536 <div class="refsect3">
537 <a name="JSON-NODE-HOLDS.parameters"></a><h4>Parameters</h4>
538 <div class="informaltable"><table class="informaltable" width="100%" border="0">
539 <colgroup>
540 <col width="150px" class="parameters_name">
541 <col class="parameters_description">
542 <col width="200px" class="parameters_annotations">
543 </colgroup>
544 <tbody>
545 <tr>
546 <td class="parameter_name"><p>node</p></td>
547 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
548 <td class="parameter_annotations"> </td>
549 </tr>
550 <tr>
551 <td class="parameter_name"><p>t</p></td>
552 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNodeType" title="enum JsonNodeType"><span class="type">JsonNodeType</span></a></p></td>
553 <td class="parameter_annotations"> </td>
554 </tr>
555 </tbody>
556 </table></div>
557 </div>
558 <p class="since">Since: <a class="link" href="ix06.html#api-index-0.10">0.10</a></p>
559 </div>
560 <hr>
561 <div class="refsect2">
562 <a name="JSON-NODE-HOLDS-VALUE:CAPS"></a><h3>JSON_NODE_HOLDS_VALUE()</h3>
563 <pre class="programlisting">#define JSON_NODE_HOLDS_VALUE(node)     (JSON_NODE_HOLDS ((node), JSON_NODE_VALUE))
564 </pre>
565 <p>Evaluates to <code class="literal">TRUE</code> if <em class="parameter"><code>node</code></em>
566  holds a <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p>
567 <div class="refsect3">
568 <a name="JSON-NODE-HOLDS-VALUE.parameters"></a><h4>Parameters</h4>
569 <div class="informaltable"><table class="informaltable" width="100%" border="0">
570 <colgroup>
571 <col width="150px" class="parameters_name">
572 <col class="parameters_description">
573 <col width="200px" class="parameters_annotations">
574 </colgroup>
575 <tbody><tr>
576 <td class="parameter_name"><p>node</p></td>
577 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
578 <td class="parameter_annotations"> </td>
579 </tr></tbody>
580 </table></div>
581 </div>
582 <p class="since">Since: <a class="link" href="ix06.html#api-index-0.10">0.10</a></p>
583 </div>
584 <hr>
585 <div class="refsect2">
586 <a name="JSON-NODE-HOLDS-OBJECT:CAPS"></a><h3>JSON_NODE_HOLDS_OBJECT()</h3>
587 <pre class="programlisting">#define JSON_NODE_HOLDS_OBJECT(node)    (JSON_NODE_HOLDS ((node), JSON_NODE_OBJECT))
588 </pre>
589 <p>Evaluates to <code class="literal">TRUE</code> if <em class="parameter"><code>node</code></em>
590  holds a <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-OBJECT:CAPS"><code class="literal">JSON_NODE_OBJECT</code></a></p>
591 <div class="refsect3">
592 <a name="JSON-NODE-HOLDS-OBJECT.parameters"></a><h4>Parameters</h4>
593 <div class="informaltable"><table class="informaltable" width="100%" border="0">
594 <colgroup>
595 <col width="150px" class="parameters_name">
596 <col class="parameters_description">
597 <col width="200px" class="parameters_annotations">
598 </colgroup>
599 <tbody><tr>
600 <td class="parameter_name"><p>node</p></td>
601 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
602 <td class="parameter_annotations"> </td>
603 </tr></tbody>
604 </table></div>
605 </div>
606 <p class="since">Since: <a class="link" href="ix06.html#api-index-0.10">0.10</a></p>
607 </div>
608 <hr>
609 <div class="refsect2">
610 <a name="JSON-NODE-HOLDS-ARRAY:CAPS"></a><h3>JSON_NODE_HOLDS_ARRAY()</h3>
611 <pre class="programlisting">#define JSON_NODE_HOLDS_ARRAY(node)     (JSON_NODE_HOLDS ((node), JSON_NODE_ARRAY))
612 </pre>
613 <p>Evaluates to <code class="literal">TRUE</code> if <em class="parameter"><code>node</code></em>
614  holds a <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-ARRAY:CAPS"><code class="literal">JSON_NODE_ARRAY</code></a></p>
615 <div class="refsect3">
616 <a name="JSON-NODE-HOLDS-ARRAY.parameters"></a><h4>Parameters</h4>
617 <div class="informaltable"><table class="informaltable" width="100%" border="0">
618 <colgroup>
619 <col width="150px" class="parameters_name">
620 <col class="parameters_description">
621 <col width="200px" class="parameters_annotations">
622 </colgroup>
623 <tbody><tr>
624 <td class="parameter_name"><p>node</p></td>
625 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
626 <td class="parameter_annotations"> </td>
627 </tr></tbody>
628 </table></div>
629 </div>
630 <p class="since">Since: <a class="link" href="ix06.html#api-index-0.10">0.10</a></p>
631 </div>
632 <hr>
633 <div class="refsect2">
634 <a name="JSON-NODE-HOLDS-NULL:CAPS"></a><h3>JSON_NODE_HOLDS_NULL()</h3>
635 <pre class="programlisting">#define JSON_NODE_HOLDS_NULL(node)      (JSON_NODE_HOLDS ((node), JSON_NODE_NULL))
636 </pre>
637 <p>Evaluates to <code class="literal">TRUE</code> if <em class="parameter"><code>node</code></em>
638  holds a <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-NULL:CAPS"><code class="literal">JSON_NODE_NULL</code></a></p>
639 <div class="refsect3">
640 <a name="JSON-NODE-HOLDS-NULL.parameters"></a><h4>Parameters</h4>
641 <div class="informaltable"><table class="informaltable" width="100%" border="0">
642 <colgroup>
643 <col width="150px" class="parameters_name">
644 <col class="parameters_description">
645 <col width="200px" class="parameters_annotations">
646 </colgroup>
647 <tbody><tr>
648 <td class="parameter_name"><p>node</p></td>
649 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
650 <td class="parameter_annotations"> </td>
651 </tr></tbody>
652 </table></div>
653 </div>
654 <p class="since">Since: <a class="link" href="ix06.html#api-index-0.10">0.10</a></p>
655 </div>
656 <hr>
657 <div class="refsect2">
658 <a name="json-node-alloc"></a><h3>json_node_alloc ()</h3>
659 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
660 json_node_alloc (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
661 <p>Allocates a new <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. Use <a class="link" href="json-glib-JSON-Node.html#json-node-init" title="json_node_init ()"><code class="function">json_node_init()</code></a> and its variants
662 to initialize the returned value.</p>
663 <p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
664 <div class="refsect3">
665 <a name="json-node-alloc.returns"></a><h4>Returns</h4>
666 <p> the newly allocated <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. Use
667 <a class="link" href="json-glib-JSON-Node.html#json-node-free" title="json_node_free ()"><code class="function">json_node_free()</code></a> to free the resources allocated by this function. </p>
668 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
669 </div>
670 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.16">0.16</a></p>
671 </div>
672 <hr>
673 <div class="refsect2">
674 <a name="json-node-init"></a><h3>json_node_init ()</h3>
675 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
676 json_node_init (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
677                 <em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNodeType" title="enum JsonNodeType"><span class="type">JsonNodeType</span></a> type</code></em>);</pre>
678 <p>Initializes a <em class="parameter"><code>node</code></em>
679  to a specific <em class="parameter"><code>type</code></em>
680 .</p>
681 <p>If the node has already been initialized once, it will be reset to
682 the given type, and any data contained will be cleared.</p>
683 <div class="refsect3">
684 <a name="json-node-init.parameters"></a><h4>Parameters</h4>
685 <div class="informaltable"><table class="informaltable" width="100%" border="0">
686 <colgroup>
687 <col width="150px" class="parameters_name">
688 <col class="parameters_description">
689 <col width="200px" class="parameters_annotations">
690 </colgroup>
691 <tbody>
692 <tr>
693 <td class="parameter_name"><p>node</p></td>
694 <td class="parameter_description"><p>the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> to initialize</p></td>
695 <td class="parameter_annotations"> </td>
696 </tr>
697 <tr>
698 <td class="parameter_name"><p>type</p></td>
699 <td class="parameter_description"><p>the type of JSON node to initialize <em class="parameter"><code>node</code></em>
700 to</p></td>
701 <td class="parameter_annotations"> </td>
702 </tr>
703 </tbody>
704 </table></div>
705 </div>
706 <div class="refsect3">
707 <a name="json-node-init.returns"></a><h4>Returns</h4>
708 <p> the initialized <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
709 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
710 </div>
711 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.16">0.16</a></p>
712 </div>
713 <hr>
714 <div class="refsect2">
715 <a name="json-node-init-int"></a><h3>json_node_init_int ()</h3>
716 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
717 json_node_init_int (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
718                     <em class="parameter"><code><span class="type">gint64</span> value</code></em>);</pre>
719 <p>Initializes <em class="parameter"><code>node</code></em>
720  to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a> and sets <em class="parameter"><code>value</code></em>
721  into it.</p>
722 <p>If the node has already been initialized once, it will be reset to
723 the given type, and any data contained will be cleared.</p>
724 <div class="refsect3">
725 <a name="json-node-init-int.parameters"></a><h4>Parameters</h4>
726 <div class="informaltable"><table class="informaltable" width="100%" border="0">
727 <colgroup>
728 <col width="150px" class="parameters_name">
729 <col class="parameters_description">
730 <col width="200px" class="parameters_annotations">
731 </colgroup>
732 <tbody>
733 <tr>
734 <td class="parameter_name"><p>node</p></td>
735 <td class="parameter_description"><p>the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> to initialize</p></td>
736 <td class="parameter_annotations"> </td>
737 </tr>
738 <tr>
739 <td class="parameter_name"><p>value</p></td>
740 <td class="parameter_description"><p>an integer</p></td>
741 <td class="parameter_annotations"> </td>
742 </tr>
743 </tbody>
744 </table></div>
745 </div>
746 <div class="refsect3">
747 <a name="json-node-init-int.returns"></a><h4>Returns</h4>
748 <p> the initialized <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
749 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
750 </div>
751 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.16">0.16</a></p>
752 </div>
753 <hr>
754 <div class="refsect2">
755 <a name="json-node-init-double"></a><h3>json_node_init_double ()</h3>
756 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
757 json_node_init_double (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
758                        <em class="parameter"><code><span class="type">gdouble</span> value</code></em>);</pre>
759 <p>Initializes <em class="parameter"><code>node</code></em>
760  to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a> and sets <em class="parameter"><code>value</code></em>
761  into it.</p>
762 <p>If the node has already been initialized once, it will be reset to
763 the given type, and any data contained will be cleared.</p>
764 <div class="refsect3">
765 <a name="json-node-init-double.parameters"></a><h4>Parameters</h4>
766 <div class="informaltable"><table class="informaltable" width="100%" border="0">
767 <colgroup>
768 <col width="150px" class="parameters_name">
769 <col class="parameters_description">
770 <col width="200px" class="parameters_annotations">
771 </colgroup>
772 <tbody>
773 <tr>
774 <td class="parameter_name"><p>node</p></td>
775 <td class="parameter_description"><p>the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> to initialize</p></td>
776 <td class="parameter_annotations"> </td>
777 </tr>
778 <tr>
779 <td class="parameter_name"><p>value</p></td>
780 <td class="parameter_description"><p>a floating point value</p></td>
781 <td class="parameter_annotations"> </td>
782 </tr>
783 </tbody>
784 </table></div>
785 </div>
786 <div class="refsect3">
787 <a name="json-node-init-double.returns"></a><h4>Returns</h4>
788 <p> the initialized <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
789 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
790 </div>
791 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.16">0.16</a></p>
792 </div>
793 <hr>
794 <div class="refsect2">
795 <a name="json-node-init-boolean"></a><h3>json_node_init_boolean ()</h3>
796 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
797 json_node_init_boolean (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
798                         <em class="parameter"><code><span class="type">gboolean</span> value</code></em>);</pre>
799 <p>Initializes <em class="parameter"><code>node</code></em>
800  to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a> and sets <em class="parameter"><code>value</code></em>
801  into it.</p>
802 <p>If the node has already been initialized once, it will be reset to
803 the given type, and any data contained will be cleared.</p>
804 <div class="refsect3">
805 <a name="json-node-init-boolean.parameters"></a><h4>Parameters</h4>
806 <div class="informaltable"><table class="informaltable" width="100%" border="0">
807 <colgroup>
808 <col width="150px" class="parameters_name">
809 <col class="parameters_description">
810 <col width="200px" class="parameters_annotations">
811 </colgroup>
812 <tbody>
813 <tr>
814 <td class="parameter_name"><p>node</p></td>
815 <td class="parameter_description"><p>the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> to initialize</p></td>
816 <td class="parameter_annotations"> </td>
817 </tr>
818 <tr>
819 <td class="parameter_name"><p>value</p></td>
820 <td class="parameter_description"><p>a boolean value</p></td>
821 <td class="parameter_annotations"> </td>
822 </tr>
823 </tbody>
824 </table></div>
825 </div>
826 <div class="refsect3">
827 <a name="json-node-init-boolean.returns"></a><h4>Returns</h4>
828 <p> the initialized <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
829 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
830 </div>
831 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.16">0.16</a></p>
832 </div>
833 <hr>
834 <div class="refsect2">
835 <a name="json-node-init-string"></a><h3>json_node_init_string ()</h3>
836 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
837 json_node_init_string (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
838                        <em class="parameter"><code>const <span class="type">char</span> *value</code></em>);</pre>
839 <p>Initializes <em class="parameter"><code>node</code></em>
840  to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a> and sets <em class="parameter"><code>value</code></em>
841  into it.</p>
842 <p>If the node has already been initialized once, it will be reset to
843 the given type, and any data contained will be cleared.</p>
844 <div class="refsect3">
845 <a name="json-node-init-string.parameters"></a><h4>Parameters</h4>
846 <div class="informaltable"><table class="informaltable" width="100%" border="0">
847 <colgroup>
848 <col width="150px" class="parameters_name">
849 <col class="parameters_description">
850 <col width="200px" class="parameters_annotations">
851 </colgroup>
852 <tbody>
853 <tr>
854 <td class="parameter_name"><p>node</p></td>
855 <td class="parameter_description"><p>the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> to initialize</p></td>
856 <td class="parameter_annotations"> </td>
857 </tr>
858 <tr>
859 <td class="parameter_name"><p>value</p></td>
860 <td class="parameter_description"><p> a string value. </p></td>
861 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
862 </tr>
863 </tbody>
864 </table></div>
865 </div>
866 <div class="refsect3">
867 <a name="json-node-init-string.returns"></a><h4>Returns</h4>
868 <p> the initialized <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
869 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
870 </div>
871 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.16">0.16</a></p>
872 </div>
873 <hr>
874 <div class="refsect2">
875 <a name="json-node-init-null"></a><h3>json_node_init_null ()</h3>
876 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
877 json_node_init_null (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
878 <p>Initializes <em class="parameter"><code>node</code></em>
879  to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-NULL:CAPS"><code class="literal">JSON_NODE_NULL</code></a>.</p>
880 <p>If the node has already been initialized once, it will be reset to
881 the given type, and any data contained will be cleared.</p>
882 <div class="refsect3">
883 <a name="json-node-init-null.parameters"></a><h4>Parameters</h4>
884 <div class="informaltable"><table class="informaltable" width="100%" border="0">
885 <colgroup>
886 <col width="150px" class="parameters_name">
887 <col class="parameters_description">
888 <col width="200px" class="parameters_annotations">
889 </colgroup>
890 <tbody><tr>
891 <td class="parameter_name"><p>node</p></td>
892 <td class="parameter_description"><p>the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> to initialize</p></td>
893 <td class="parameter_annotations"> </td>
894 </tr></tbody>
895 </table></div>
896 </div>
897 <div class="refsect3">
898 <a name="json-node-init-null.returns"></a><h4>Returns</h4>
899 <p> the initialized <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
900 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
901 </div>
902 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.16">0.16</a></p>
903 </div>
904 <hr>
905 <div class="refsect2">
906 <a name="json-node-init-object"></a><h3>json_node_init_object ()</h3>
907 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
908 json_node_init_object (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
909                        <em class="parameter"><code><a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a> *object</code></em>);</pre>
910 <p>Initializes <em class="parameter"><code>node</code></em>
911  to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-OBJECT:CAPS"><code class="literal">JSON_NODE_OBJECT</code></a> and sets <em class="parameter"><code>object</code></em>
912  into it.</p>
913 <p>This function will take a reference on <em class="parameter"><code>object</code></em>
914 .</p>
915 <p>If the node has already been initialized once, it will be reset to
916 the given type, and any data contained will be cleared.</p>
917 <div class="refsect3">
918 <a name="json-node-init-object.parameters"></a><h4>Parameters</h4>
919 <div class="informaltable"><table class="informaltable" width="100%" border="0">
920 <colgroup>
921 <col width="150px" class="parameters_name">
922 <col class="parameters_description">
923 <col width="200px" class="parameters_annotations">
924 </colgroup>
925 <tbody>
926 <tr>
927 <td class="parameter_name"><p>node</p></td>
928 <td class="parameter_description"><p>the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> to initialize</p></td>
929 <td class="parameter_annotations"> </td>
930 </tr>
931 <tr>
932 <td class="parameter_name"><p>object</p></td>
933 <td class="parameter_description"><p> the <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a> to initialize <em class="parameter"><code>node</code></em>
934 with, or <code class="literal">NULL</code>. </p></td>
935 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
936 </tr>
937 </tbody>
938 </table></div>
939 </div>
940 <div class="refsect3">
941 <a name="json-node-init-object.returns"></a><h4>Returns</h4>
942 <p> the initialized <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
943 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
944 </div>
945 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.16">0.16</a></p>
946 </div>
947 <hr>
948 <div class="refsect2">
949 <a name="json-node-init-array"></a><h3>json_node_init_array ()</h3>
950 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
951 json_node_init_array (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
952                       <em class="parameter"><code><a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> *array</code></em>);</pre>
953 <p>Initializes <em class="parameter"><code>node</code></em>
954  to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-ARRAY:CAPS"><code class="literal">JSON_NODE_ARRAY</code></a> and sets <em class="parameter"><code>array</code></em>
955  into it.</p>
956 <p>This function will take a reference on <em class="parameter"><code>array</code></em>
957 .</p>
958 <p>If the node has already been initialized once, it will be reset to
959 the given type, and any data contained will be cleared.</p>
960 <div class="refsect3">
961 <a name="json-node-init-array.parameters"></a><h4>Parameters</h4>
962 <div class="informaltable"><table class="informaltable" width="100%" border="0">
963 <colgroup>
964 <col width="150px" class="parameters_name">
965 <col class="parameters_description">
966 <col width="200px" class="parameters_annotations">
967 </colgroup>
968 <tbody>
969 <tr>
970 <td class="parameter_name"><p>node</p></td>
971 <td class="parameter_description"><p>the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> to initialize</p></td>
972 <td class="parameter_annotations"> </td>
973 </tr>
974 <tr>
975 <td class="parameter_name"><p>array</p></td>
976 <td class="parameter_description"><p> the <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> to initialize <em class="parameter"><code>node</code></em>
977 with, or <code class="literal">NULL</code>. </p></td>
978 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
979 </tr>
980 </tbody>
981 </table></div>
982 </div>
983 <div class="refsect3">
984 <a name="json-node-init-array.returns"></a><h4>Returns</h4>
985 <p> the initialized <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
986 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></p>
987 </div>
988 <p class="since">Since: <a class="link" href="ix09.html#api-index-0.16">0.16</a></p>
989 </div>
990 <hr>
991 <div class="refsect2">
992 <a name="json-node-new"></a><h3>json_node_new ()</h3>
993 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
994 json_node_new (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNodeType" title="enum JsonNodeType"><span class="type">JsonNodeType</span></a> type</code></em>);</pre>
995 <p>Creates a new <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of <em class="parameter"><code>type</code></em>
996 .</p>
997 <p>This is a convenience function for <a class="link" href="json-glib-JSON-Node.html#json-node-alloc" title="json_node_alloc ()"><code class="function">json_node_alloc()</code></a> and <a class="link" href="json-glib-JSON-Node.html#json-node-init" title="json_node_init ()"><code class="function">json_node_init()</code></a>,
998 and it's the equivalent of:</p>
999 <div class="informalexample">
1000   <table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
1001     <tbody>
1002       <tr>
1003         <td class="listing_lines" align="right"><pre>1</pre></td>
1004         <td class="listing_code"><pre class="programlisting"><span class="function"><a href="json-glib-JSON-Node.html#json-node-init">json_node_init</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="json-glib-JSON-Node.html#json-node-alloc">json_node_alloc</a></span><span class="normal"> </span><span class="symbol">(),</span><span class="normal"> type</span><span class="symbol">);</span></pre></td>
1005       </tr>
1006     </tbody>
1007   </table>
1008 </div>
1009
1010 <p></p>
1011 <p><span class="annotation">[<acronym title="This symbol is a constructor, not a static method."><span class="acronym">constructor</span></acronym>]</span></p>
1012 <div class="refsect3">
1013 <a name="json-node-new.parameters"></a><h4>Parameters</h4>
1014 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1015 <colgroup>
1016 <col width="150px" class="parameters_name">
1017 <col class="parameters_description">
1018 <col width="200px" class="parameters_annotations">
1019 </colgroup>
1020 <tbody><tr>
1021 <td class="parameter_name"><p>type</p></td>
1022 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNodeType" title="enum JsonNodeType"><span class="type">JsonNodeType</span></a></p></td>
1023 <td class="parameter_annotations"> </td>
1024 </tr></tbody>
1025 </table></div>
1026 </div>
1027 <div class="refsect3">
1028 <a name="json-node-new.returns"></a><h4>Returns</h4>
1029 <p> the newly created <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
1030 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1031 </div>
1032 </div>
1033 <hr>
1034 <div class="refsect2">
1035 <a name="json-node-copy"></a><h3>json_node_copy ()</h3>
1036 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
1037 json_node_copy (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1038 <p>Copies <em class="parameter"><code>node</code></em>
1039 . If the node contains complex data types, their reference
1040 counts are increased, regardless of whether the node is mutable or
1041 immutable.</p>
1042 <p>The copy will be immutable if, and only if, <em class="parameter"><code>node</code></em>
1043  is immutable. However,
1044 there should be no need to copy an immutable node.</p>
1045 <div class="refsect3">
1046 <a name="json-node-copy.parameters"></a><h4>Parameters</h4>
1047 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1048 <colgroup>
1049 <col width="150px" class="parameters_name">
1050 <col class="parameters_description">
1051 <col width="200px" class="parameters_annotations">
1052 </colgroup>
1053 <tbody><tr>
1054 <td class="parameter_name"><p>node</p></td>
1055 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1056 <td class="parameter_annotations"> </td>
1057 </tr></tbody>
1058 </table></div>
1059 </div>
1060 <div class="refsect3">
1061 <a name="json-node-copy.returns"></a><h4>Returns</h4>
1062 <p> the copied <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p>
1063 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1064 </div>
1065 </div>
1066 <hr>
1067 <div class="refsect2">
1068 <a name="json-node-free"></a><h3>json_node_free ()</h3>
1069 <pre class="programlisting"><span class="returnvalue">void</span>
1070 json_node_free (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1071 <p>Frees the resources allocated by <em class="parameter"><code>node</code></em>
1072 .</p>
1073 <div class="refsect3">
1074 <a name="json-node-free.parameters"></a><h4>Parameters</h4>
1075 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1076 <colgroup>
1077 <col width="150px" class="parameters_name">
1078 <col class="parameters_description">
1079 <col width="200px" class="parameters_annotations">
1080 </colgroup>
1081 <tbody><tr>
1082 <td class="parameter_name"><p>node</p></td>
1083 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1084 <td class="parameter_annotations"> </td>
1085 </tr></tbody>
1086 </table></div>
1087 </div>
1088 </div>
1089 <hr>
1090 <div class="refsect2">
1091 <a name="json-node-ref"></a><h3>json_node_ref ()</h3>
1092 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
1093 json_node_ref (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1094 <p>Increment the reference count of <em class="parameter"><code>node</code></em>
1095 .</p>
1096 <div class="refsect3">
1097 <a name="json-node-ref.parameters"></a><h4>Parameters</h4>
1098 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1099 <colgroup>
1100 <col width="150px" class="parameters_name">
1101 <col class="parameters_description">
1102 <col width="200px" class="parameters_annotations">
1103 </colgroup>
1104 <tbody><tr>
1105 <td class="parameter_name"><p>node</p></td>
1106 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1107 <td class="parameter_annotations"> </td>
1108 </tr></tbody>
1109 </table></div>
1110 </div>
1111 <div class="refsect3">
1112 <a name="json-node-ref.returns"></a><h4>Returns</h4>
1113 <p> a pointer to <em class="parameter"><code>node</code></em>
1114 . </p>
1115 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
1116 </div>
1117 <p class="since">Since: <a class="link" href="ix11.html#api-index-1.2">1.2</a></p>
1118 </div>
1119 <hr>
1120 <div class="refsect2">
1121 <a name="json-node-unref"></a><h3>json_node_unref ()</h3>
1122 <pre class="programlisting"><span class="returnvalue">void</span>
1123 json_node_unref (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1124 <p>Decrement the reference count of <em class="parameter"><code>node</code></em>
1125 . If it reaches zero, the node is
1126 freed.</p>
1127 <div class="refsect3">
1128 <a name="json-node-unref.parameters"></a><h4>Parameters</h4>
1129 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1130 <colgroup>
1131 <col width="150px" class="parameters_name">
1132 <col class="parameters_description">
1133 <col width="200px" class="parameters_annotations">
1134 </colgroup>
1135 <tbody><tr>
1136 <td class="parameter_name"><p>node</p></td>
1137 <td class="parameter_description"><p> a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. </p></td>
1138 <td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
1139 </tr></tbody>
1140 </table></div>
1141 </div>
1142 <p class="since">Since: <a class="link" href="ix11.html#api-index-1.2">1.2</a></p>
1143 </div>
1144 <hr>
1145 <div class="refsect2">
1146 <a name="json-node-is-immutable"></a><h3>json_node_is_immutable ()</h3>
1147 <pre class="programlisting"><span class="returnvalue">gboolean</span>
1148 json_node_is_immutable (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1149 <p>Check whether the given <em class="parameter"><code>node</code></em>
1150  has been marked as immutable by calling
1151 <a class="link" href="json-glib-JSON-Node.html#json-node-seal" title="json_node_seal ()"><code class="function">json_node_seal()</code></a> on it.</p>
1152 <div class="refsect3">
1153 <a name="json-node-is-immutable.parameters"></a><h4>Parameters</h4>
1154 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1155 <colgroup>
1156 <col width="150px" class="parameters_name">
1157 <col class="parameters_description">
1158 <col width="200px" class="parameters_annotations">
1159 </colgroup>
1160 <tbody><tr>
1161 <td class="parameter_name"><p>node</p></td>
1162 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1163 <td class="parameter_annotations"> </td>
1164 </tr></tbody>
1165 </table></div>
1166 </div>
1167 <div class="refsect3">
1168 <a name="json-node-is-immutable.returns"></a><h4>Returns</h4>
1169 <p> <code class="literal">TRUE</code> if the <em class="parameter"><code>node</code></em>
1170 is immutable</p>
1171 </div>
1172 <p class="since">Since: <a class="link" href="ix11.html#api-index-1.2">1.2</a></p>
1173 </div>
1174 <hr>
1175 <div class="refsect2">
1176 <a name="json-node-seal"></a><h3>json_node_seal ()</h3>
1177 <pre class="programlisting"><span class="returnvalue">void</span>
1178 json_node_seal (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1179 <p>Seals the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>, making it immutable to further changes. In order to be
1180 sealed, the <em class="parameter"><code>node</code></em>
1181  must have a type and value set. The value will be
1182 recursively sealed — if the node holds an object, that <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a> will be
1183 sealed, etc.</p>
1184 <p>If the <em class="parameter"><code>node</code></em>
1185  is already immutable, this is a no-op.</p>
1186 <div class="refsect3">
1187 <a name="json-node-seal.parameters"></a><h4>Parameters</h4>
1188 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1189 <colgroup>
1190 <col width="150px" class="parameters_name">
1191 <col class="parameters_description">
1192 <col width="200px" class="parameters_annotations">
1193 </colgroup>
1194 <tbody><tr>
1195 <td class="parameter_name"><p>node</p></td>
1196 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1197 <td class="parameter_annotations"> </td>
1198 </tr></tbody>
1199 </table></div>
1200 </div>
1201 <p class="since">Since: <a class="link" href="ix11.html#api-index-1.2">1.2</a></p>
1202 </div>
1203 <hr>
1204 <div class="refsect2">
1205 <a name="json-node-hash"></a><h3>json_node_hash ()</h3>
1206 <pre class="programlisting"><span class="returnvalue">guint</span>
1207 json_node_hash (<em class="parameter"><code><span class="type">gconstpointer</span> key</code></em>);</pre>
1208 <p>Calculate a hash value for the given <em class="parameter"><code>key</code></em>
1209  (a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>).</p>
1210 <p>The hash is calculated over the node and its value, recursively. If the node
1211 is immutable, this is a fast operation; otherwise, it scales proportionally
1212 with the size of the node’s value (for example, with the number of members
1213 in the <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a> if this node contains an object).</p>
1214 <div class="refsect3">
1215 <a name="json-node-hash.parameters"></a><h4>Parameters</h4>
1216 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1217 <colgroup>
1218 <col width="150px" class="parameters_name">
1219 <col class="parameters_description">
1220 <col width="200px" class="parameters_annotations">
1221 </colgroup>
1222 <tbody><tr>
1223 <td class="parameter_name"><p>key</p></td>
1224 <td class="parameter_description"><p> a JSON node to hash. </p></td>
1225 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> JsonNode]</span></td>
1226 </tr></tbody>
1227 </table></div>
1228 </div>
1229 <div class="refsect3">
1230 <a name="json-node-hash.returns"></a><h4>Returns</h4>
1231 <p> hash value for <em class="parameter"><code>key</code></em>
1232 </p>
1233 </div>
1234 <p class="since">Since: <a class="link" href="ix11.html#api-index-1.2">1.2</a></p>
1235 </div>
1236 <hr>
1237 <div class="refsect2">
1238 <a name="json-node-equal"></a><h3>json_node_equal ()</h3>
1239 <pre class="programlisting"><span class="returnvalue">gboolean</span>
1240 json_node_equal (<em class="parameter"><code><span class="type">gconstpointer</span> a</code></em>,
1241                  <em class="parameter"><code><span class="type">gconstpointer</span> b</code></em>);</pre>
1242 <p>Check whether <em class="parameter"><code>a</code></em>
1243  and <em class="parameter"><code>b</code></em>
1244  are equal <a href="json-glib-JSON-Node.html#JsonNode-struct"><span class="type">JsonNodes</span></a>, meaning they have the same
1245 type and same values (checked recursively). Note that integer values are
1246 compared numerically, ignoring type, so a double value 4.0 is equal to the
1247 integer value 4.</p>
1248 <div class="refsect3">
1249 <a name="json-node-equal.parameters"></a><h4>Parameters</h4>
1250 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1251 <colgroup>
1252 <col width="150px" class="parameters_name">
1253 <col class="parameters_description">
1254 <col width="200px" class="parameters_annotations">
1255 </colgroup>
1256 <tbody>
1257 <tr>
1258 <td class="parameter_name"><p>a</p></td>
1259 <td class="parameter_description"><p> a JSON node. </p></td>
1260 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> JsonNode]</span></td>
1261 </tr>
1262 <tr>
1263 <td class="parameter_name"><p>b</p></td>
1264 <td class="parameter_description"><p> another JSON node. </p></td>
1265 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> JsonNode]</span></td>
1266 </tr>
1267 </tbody>
1268 </table></div>
1269 </div>
1270 <div class="refsect3">
1271 <a name="json-node-equal.returns"></a><h4>Returns</h4>
1272 <p> <code class="literal">TRUE</code> if <em class="parameter"><code>a</code></em>
1273 and <em class="parameter"><code>b</code></em>
1274 are equal; <code class="literal">FALSE</code> otherwise</p>
1275 </div>
1276 <p class="since">Since: <a class="link" href="ix11.html#api-index-1.2">1.2</a></p>
1277 </div>
1278 <hr>
1279 <div class="refsect2">
1280 <a name="json-node-set-array"></a><h3>json_node_set_array ()</h3>
1281 <pre class="programlisting"><span class="returnvalue">void</span>
1282 json_node_set_array (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1283                      <em class="parameter"><code><a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> *array</code></em>);</pre>
1284 <p>Sets <em class="parameter"><code>array</code></em>
1285  inside <em class="parameter"><code>node</code></em>
1286  and increases the <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> reference count.</p>
1287 <p>It is an error to call this on an immutable node.</p>
1288 <div class="refsect3">
1289 <a name="json-node-set-array.parameters"></a><h4>Parameters</h4>
1290 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1291 <colgroup>
1292 <col width="150px" class="parameters_name">
1293 <col class="parameters_description">
1294 <col width="200px" class="parameters_annotations">
1295 </colgroup>
1296 <tbody>
1297 <tr>
1298 <td class="parameter_name"><p>node</p></td>
1299 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> initialized to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-ARRAY:CAPS"><code class="literal">JSON_NODE_ARRAY</code></a></p></td>
1300 <td class="parameter_annotations"> </td>
1301 </tr>
1302 <tr>
1303 <td class="parameter_name"><p>array</p></td>
1304 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a></p></td>
1305 <td class="parameter_annotations"> </td>
1306 </tr>
1307 </tbody>
1308 </table></div>
1309 </div>
1310 </div>
1311 <hr>
1312 <div class="refsect2">
1313 <a name="json-node-take-array"></a><h3>json_node_take_array ()</h3>
1314 <pre class="programlisting"><span class="returnvalue">void</span>
1315 json_node_take_array (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1316                       <em class="parameter"><code><a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> *array</code></em>);</pre>
1317 <p>Sets <em class="parameter"><code>array</code></em>
1318  into <em class="parameter"><code>node</code></em>
1319  without increasing the <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> reference count.</p>
1320 <p>It is an error to call this on an immutable node.</p>
1321 <div class="refsect3">
1322 <a name="json-node-take-array.parameters"></a><h4>Parameters</h4>
1323 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1324 <colgroup>
1325 <col width="150px" class="parameters_name">
1326 <col class="parameters_description">
1327 <col width="200px" class="parameters_annotations">
1328 </colgroup>
1329 <tbody>
1330 <tr>
1331 <td class="parameter_name"><p>node</p></td>
1332 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> initialized to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-ARRAY:CAPS"><code class="literal">JSON_NODE_ARRAY</code></a></p></td>
1333 <td class="parameter_annotations"> </td>
1334 </tr>
1335 <tr>
1336 <td class="parameter_name"><p>array</p></td>
1337 <td class="parameter_description"><p> a <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a>. </p></td>
1338 <td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
1339 </tr>
1340 </tbody>
1341 </table></div>
1342 </div>
1343 </div>
1344 <hr>
1345 <div class="refsect2">
1346 <a name="json-node-get-array"></a><h3>json_node_get_array ()</h3>
1347 <pre class="programlisting"><a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="returnvalue">JsonArray</span></a> *
1348 json_node_get_array (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1349 <p>Retrieves the <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> stored inside a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. If the node does not
1350 hold an array value, <code class="literal">NULL</code> is returned.</p>
1351 <div class="refsect3">
1352 <a name="json-node-get-array.parameters"></a><h4>Parameters</h4>
1353 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1354 <colgroup>
1355 <col width="150px" class="parameters_name">
1356 <col class="parameters_description">
1357 <col width="200px" class="parameters_annotations">
1358 </colgroup>
1359 <tbody><tr>
1360 <td class="parameter_name"><p>node</p></td>
1361 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1362 <td class="parameter_annotations"> </td>
1363 </tr></tbody>
1364 </table></div>
1365 </div>
1366 <div class="refsect3">
1367 <a name="json-node-get-array.returns"></a><h4>Returns</h4>
1368 <p> the <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a>. </p>
1369 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1370 </div>
1371 </div>
1372 <hr>
1373 <div class="refsect2">
1374 <a name="json-node-dup-array"></a><h3>json_node_dup_array ()</h3>
1375 <pre class="programlisting"><a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="returnvalue">JsonArray</span></a> *
1376 json_node_dup_array (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1377 <p>Retrieves the <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> stored inside a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> and returns it
1378 with its reference count increased by one. If the node does not hold an
1379 array value, <code class="literal">NULL</code> is returned.</p>
1380 <div class="refsect3">
1381 <a name="json-node-dup-array.parameters"></a><h4>Parameters</h4>
1382 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1383 <colgroup>
1384 <col width="150px" class="parameters_name">
1385 <col class="parameters_description">
1386 <col width="200px" class="parameters_annotations">
1387 </colgroup>
1388 <tbody><tr>
1389 <td class="parameter_name"><p>node</p></td>
1390 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1391 <td class="parameter_annotations"> </td>
1392 </tr></tbody>
1393 </table></div>
1394 </div>
1395 <div class="refsect3">
1396 <a name="json-node-dup-array.returns"></a><h4>Returns</h4>
1397 <p> the <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a> with its reference
1398 count increased. </p>
1399 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1400 </div>
1401 </div>
1402 <hr>
1403 <div class="refsect2">
1404 <a name="json-node-set-object"></a><h3>json_node_set_object ()</h3>
1405 <pre class="programlisting"><span class="returnvalue">void</span>
1406 json_node_set_object (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1407                       <em class="parameter"><code><a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a> *object</code></em>);</pre>
1408 <p>Sets <em class="parameter"><code>objects</code></em>
1409  inside <em class="parameter"><code>node</code></em>
1410 . The reference count of <em class="parameter"><code>object</code></em>
1411  is increased.</p>
1412 <p>If <em class="parameter"><code>object</code></em>
1413  is <code class="literal">NULL</code>, the node’s existing object is cleared.</p>
1414 <p>It is an error to call this on an immutable node.</p>
1415 <div class="refsect3">
1416 <a name="json-node-set-object.parameters"></a><h4>Parameters</h4>
1417 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1418 <colgroup>
1419 <col width="150px" class="parameters_name">
1420 <col class="parameters_description">
1421 <col width="200px" class="parameters_annotations">
1422 </colgroup>
1423 <tbody>
1424 <tr>
1425 <td class="parameter_name"><p>node</p></td>
1426 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> initialized to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-OBJECT:CAPS"><code class="literal">JSON_NODE_OBJECT</code></a></p></td>
1427 <td class="parameter_annotations"> </td>
1428 </tr>
1429 <tr>
1430 <td class="parameter_name"><p>object</p></td>
1431 <td class="parameter_description"><p> a <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a>. </p></td>
1432 <td class="parameter_annotations"><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
1433 </tr>
1434 </tbody>
1435 </table></div>
1436 </div>
1437 </div>
1438 <hr>
1439 <div class="refsect2">
1440 <a name="json-node-take-object"></a><h3>json_node_take_object ()</h3>
1441 <pre class="programlisting"><span class="returnvalue">void</span>
1442 json_node_take_object (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1443                        <em class="parameter"><code><a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a> *object</code></em>);</pre>
1444 <p>Sets <em class="parameter"><code>object</code></em>
1445  inside <em class="parameter"><code>node</code></em>
1446 . The reference count of <em class="parameter"><code>object</code></em>
1447  is not increased.</p>
1448 <p>It is an error to call this on an immutable node.</p>
1449 <div class="refsect3">
1450 <a name="json-node-take-object.parameters"></a><h4>Parameters</h4>
1451 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1452 <colgroup>
1453 <col width="150px" class="parameters_name">
1454 <col class="parameters_description">
1455 <col width="200px" class="parameters_annotations">
1456 </colgroup>
1457 <tbody>
1458 <tr>
1459 <td class="parameter_name"><p>node</p></td>
1460 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> initialized to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-OBJECT:CAPS"><code class="literal">JSON_NODE_OBJECT</code></a></p></td>
1461 <td class="parameter_annotations"> </td>
1462 </tr>
1463 <tr>
1464 <td class="parameter_name"><p>object</p></td>
1465 <td class="parameter_description"><p> a <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a>. </p></td>
1466 <td class="parameter_annotations"><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></td>
1467 </tr>
1468 </tbody>
1469 </table></div>
1470 </div>
1471 </div>
1472 <hr>
1473 <div class="refsect2">
1474 <a name="json-node-get-object"></a><h3>json_node_get_object ()</h3>
1475 <pre class="programlisting"><a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="returnvalue">JsonObject</span></a> *
1476 json_node_get_object (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1477 <p>Retrieves the <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a> stored inside a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. If the node does not
1478 hold an object value, <code class="literal">NULL</code> is returned.</p>
1479 <div class="refsect3">
1480 <a name="json-node-get-object.parameters"></a><h4>Parameters</h4>
1481 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1482 <colgroup>
1483 <col width="150px" class="parameters_name">
1484 <col class="parameters_description">
1485 <col width="200px" class="parameters_annotations">
1486 </colgroup>
1487 <tbody><tr>
1488 <td class="parameter_name"><p>node</p></td>
1489 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1490 <td class="parameter_annotations"> </td>
1491 </tr></tbody>
1492 </table></div>
1493 </div>
1494 <div class="refsect3">
1495 <a name="json-node-get-object.returns"></a><h4>Returns</h4>
1496 <p> the <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a>. </p>
1497 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1498 </div>
1499 </div>
1500 <hr>
1501 <div class="refsect2">
1502 <a name="json-node-dup-object"></a><h3>json_node_dup_object ()</h3>
1503 <pre class="programlisting"><a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="returnvalue">JsonObject</span></a> *
1504 json_node_dup_object (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1505 <p>Retrieves the <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a> inside <em class="parameter"><code>node</code></em>
1506 . The reference count of
1507 the returned object is increased. If the node does not hold an object value,
1508 <code class="literal">NULL</code> is returned.</p>
1509 <div class="refsect3">
1510 <a name="json-node-dup-object.parameters"></a><h4>Parameters</h4>
1511 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1512 <colgroup>
1513 <col width="150px" class="parameters_name">
1514 <col class="parameters_description">
1515 <col width="200px" class="parameters_annotations">
1516 </colgroup>
1517 <tbody><tr>
1518 <td class="parameter_name"><p>node</p></td>
1519 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1520 <td class="parameter_annotations"> </td>
1521 </tr></tbody>
1522 </table></div>
1523 </div>
1524 <div class="refsect3">
1525 <a name="json-node-dup-object.returns"></a><h4>Returns</h4>
1526 <p> the <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a>. </p>
1527 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1528 </div>
1529 </div>
1530 <hr>
1531 <div class="refsect2">
1532 <a name="json-node-set-value"></a><h3>json_node_set_value ()</h3>
1533 <pre class="programlisting"><span class="returnvalue">void</span>
1534 json_node_set_value (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1535                      <em class="parameter"><code>const <span class="type">GValue</span> *value</code></em>);</pre>
1536 <p>Sets <em class="parameter"><code>value</code></em>
1537  inside <em class="parameter"><code>node</code></em>
1538 . The passed <span class="type">GValue</span> is copied into the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>.</p>
1539 <p>It is an error to call this on an immutable node.</p>
1540 <div class="refsect3">
1541 <a name="json-node-set-value.parameters"></a><h4>Parameters</h4>
1542 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1543 <colgroup>
1544 <col width="150px" class="parameters_name">
1545 <col class="parameters_description">
1546 <col width="200px" class="parameters_annotations">
1547 </colgroup>
1548 <tbody>
1549 <tr>
1550 <td class="parameter_name"><p>node</p></td>
1551 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> initialized to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1552 <td class="parameter_annotations"> </td>
1553 </tr>
1554 <tr>
1555 <td class="parameter_name"><p>value</p></td>
1556 <td class="parameter_description"><p>the <span class="type">GValue</span> to set</p></td>
1557 <td class="parameter_annotations"> </td>
1558 </tr>
1559 </tbody>
1560 </table></div>
1561 </div>
1562 </div>
1563 <hr>
1564 <div class="refsect2">
1565 <a name="json-node-get-value"></a><h3>json_node_get_value ()</h3>
1566 <pre class="programlisting"><span class="returnvalue">void</span>
1567 json_node_get_value (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1568                      <em class="parameter"><code><span class="type">GValue</span> *value</code></em>);</pre>
1569 <p>Retrieves a value from a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> and copies into <em class="parameter"><code>value</code></em>
1570 . When done
1571 using it, call <code class="function">g_value_unset()</code> on the <span class="type">GValue</span>. If the node does not hold a
1572 scalar value, <em class="parameter"><code>value</code></em>
1573  is not modified.</p>
1574 <div class="refsect3">
1575 <a name="json-node-get-value.parameters"></a><h4>Parameters</h4>
1576 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1577 <colgroup>
1578 <col width="150px" class="parameters_name">
1579 <col class="parameters_description">
1580 <col width="200px" class="parameters_annotations">
1581 </colgroup>
1582 <tbody>
1583 <tr>
1584 <td class="parameter_name"><p>node</p></td>
1585 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1586 <td class="parameter_annotations"> </td>
1587 </tr>
1588 <tr>
1589 <td class="parameter_name"><p>value</p></td>
1590 <td class="parameter_description"><p> return location for an uninitialized value. </p></td>
1591 <td class="parameter_annotations"><span class="annotation">[<acronym title="Out parameter, where caller must allocate storage."><span class="acronym">out caller-allocates</span></acronym>]</span></td>
1592 </tr>
1593 </tbody>
1594 </table></div>
1595 </div>
1596 </div>
1597 <hr>
1598 <div class="refsect2">
1599 <a name="json-node-set-boolean"></a><h3>json_node_set_boolean ()</h3>
1600 <pre class="programlisting"><span class="returnvalue">void</span>
1601 json_node_set_boolean (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1602                        <em class="parameter"><code><span class="type">gboolean</span> value</code></em>);</pre>
1603 <p>Sets <em class="parameter"><code>value</code></em>
1604  as the boolean content of the <em class="parameter"><code>node</code></em>
1605 , replacing any existing
1606 content.</p>
1607 <p>It is an error to call this on an immutable node.</p>
1608 <div class="refsect3">
1609 <a name="json-node-set-boolean.parameters"></a><h4>Parameters</h4>
1610 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1611 <colgroup>
1612 <col width="150px" class="parameters_name">
1613 <col class="parameters_description">
1614 <col width="200px" class="parameters_annotations">
1615 </colgroup>
1616 <tbody>
1617 <tr>
1618 <td class="parameter_name"><p>node</p></td>
1619 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of type <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1620 <td class="parameter_annotations"> </td>
1621 </tr>
1622 <tr>
1623 <td class="parameter_name"><p>value</p></td>
1624 <td class="parameter_description"><p>a boolean value</p></td>
1625 <td class="parameter_annotations"> </td>
1626 </tr>
1627 </tbody>
1628 </table></div>
1629 </div>
1630 </div>
1631 <hr>
1632 <div class="refsect2">
1633 <a name="json-node-get-boolean"></a><h3>json_node_get_boolean ()</h3>
1634 <pre class="programlisting"><span class="returnvalue">gboolean</span>
1635 json_node_get_boolean (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1636 <p>Gets the boolean value stored inside a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. If the node holds an
1637 integer or double value which is zero, <code class="literal">FALSE</code> is returned; otherwise <code class="literal">TRUE</code>
1638 is returned. If the node holds a <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-NULL:CAPS"><code class="literal">JSON_NODE_NULL</code></a> value or a value of another
1639 non-boolean type, <code class="literal">FALSE</code> is returned.</p>
1640 <div class="refsect3">
1641 <a name="json-node-get-boolean.parameters"></a><h4>Parameters</h4>
1642 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1643 <colgroup>
1644 <col width="150px" class="parameters_name">
1645 <col class="parameters_description">
1646 <col width="200px" class="parameters_annotations">
1647 </colgroup>
1648 <tbody><tr>
1649 <td class="parameter_name"><p>node</p></td>
1650 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of type <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1651 <td class="parameter_annotations"> </td>
1652 </tr></tbody>
1653 </table></div>
1654 </div>
1655 <div class="refsect3">
1656 <a name="json-node-get-boolean.returns"></a><h4>Returns</h4>
1657 <p> a boolean value.</p>
1658 </div>
1659 </div>
1660 <hr>
1661 <div class="refsect2">
1662 <a name="json-node-set-double"></a><h3>json_node_set_double ()</h3>
1663 <pre class="programlisting"><span class="returnvalue">void</span>
1664 json_node_set_double (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1665                       <em class="parameter"><code><span class="type">gdouble</span> value</code></em>);</pre>
1666 <p>Sets <em class="parameter"><code>value</code></em>
1667  as the double content of the <em class="parameter"><code>node</code></em>
1668 , replacing any existing
1669 content.</p>
1670 <p>It is an error to call this on an immutable node.</p>
1671 <div class="refsect3">
1672 <a name="json-node-set-double.parameters"></a><h4>Parameters</h4>
1673 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1674 <colgroup>
1675 <col width="150px" class="parameters_name">
1676 <col class="parameters_description">
1677 <col width="200px" class="parameters_annotations">
1678 </colgroup>
1679 <tbody>
1680 <tr>
1681 <td class="parameter_name"><p>node</p></td>
1682 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of type <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1683 <td class="parameter_annotations"> </td>
1684 </tr>
1685 <tr>
1686 <td class="parameter_name"><p>value</p></td>
1687 <td class="parameter_description"><p>a double value</p></td>
1688 <td class="parameter_annotations"> </td>
1689 </tr>
1690 </tbody>
1691 </table></div>
1692 </div>
1693 </div>
1694 <hr>
1695 <div class="refsect2">
1696 <a name="json-node-get-double"></a><h3>json_node_get_double ()</h3>
1697 <pre class="programlisting"><span class="returnvalue">gdouble</span>
1698 json_node_get_double (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1699 <p>Gets the double value stored inside a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. If the node holds an integer
1700 value, it is returned as a double. If the node holds a <code class="literal">FALSE</code> boolean value,
1701 <code class="literal">0.0</code> is returned; otherwise a non-zero double is returned. If the node holds
1702 a <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-NULL:CAPS"><code class="literal">JSON_NODE_NULL</code></a> value or a value of another non-double type, <code class="literal">0.0</code> is
1703 returned.</p>
1704 <div class="refsect3">
1705 <a name="json-node-get-double.parameters"></a><h4>Parameters</h4>
1706 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1707 <colgroup>
1708 <col width="150px" class="parameters_name">
1709 <col class="parameters_description">
1710 <col width="200px" class="parameters_annotations">
1711 </colgroup>
1712 <tbody><tr>
1713 <td class="parameter_name"><p>node</p></td>
1714 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of type <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1715 <td class="parameter_annotations"> </td>
1716 </tr></tbody>
1717 </table></div>
1718 </div>
1719 <div class="refsect3">
1720 <a name="json-node-get-double.returns"></a><h4>Returns</h4>
1721 <p> a double value.</p>
1722 </div>
1723 </div>
1724 <hr>
1725 <div class="refsect2">
1726 <a name="json-node-set-int"></a><h3>json_node_set_int ()</h3>
1727 <pre class="programlisting"><span class="returnvalue">void</span>
1728 json_node_set_int (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1729                    <em class="parameter"><code><span class="type">gint64</span> value</code></em>);</pre>
1730 <p>Sets <em class="parameter"><code>value</code></em>
1731  as the integer content of the <em class="parameter"><code>node</code></em>
1732 , replacing any existing
1733 content.</p>
1734 <p>It is an error to call this on an immutable node.</p>
1735 <div class="refsect3">
1736 <a name="json-node-set-int.parameters"></a><h4>Parameters</h4>
1737 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1738 <colgroup>
1739 <col width="150px" class="parameters_name">
1740 <col class="parameters_description">
1741 <col width="200px" class="parameters_annotations">
1742 </colgroup>
1743 <tbody>
1744 <tr>
1745 <td class="parameter_name"><p>node</p></td>
1746 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of type <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1747 <td class="parameter_annotations"> </td>
1748 </tr>
1749 <tr>
1750 <td class="parameter_name"><p>value</p></td>
1751 <td class="parameter_description"><p>an integer value</p></td>
1752 <td class="parameter_annotations"> </td>
1753 </tr>
1754 </tbody>
1755 </table></div>
1756 </div>
1757 </div>
1758 <hr>
1759 <div class="refsect2">
1760 <a name="json-node-get-int"></a><h3>json_node_get_int ()</h3>
1761 <pre class="programlisting"><span class="returnvalue">gint64</span>
1762 json_node_get_int (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1763 <p>Gets the integer value stored inside a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. If the node holds a double
1764 value, its integer component is returned. If the node holds a <code class="literal">FALSE</code> boolean
1765 value, <code class="literal">0</code> is returned; otherwise a non-zero integer is returned. If the
1766 node holds a <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-NULL:CAPS"><code class="literal">JSON_NODE_NULL</code></a> value or a value of another non-integer type,
1767 <code class="literal">0</code> is returned.</p>
1768 <div class="refsect3">
1769 <a name="json-node-get-int.parameters"></a><h4>Parameters</h4>
1770 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1771 <colgroup>
1772 <col width="150px" class="parameters_name">
1773 <col class="parameters_description">
1774 <col width="200px" class="parameters_annotations">
1775 </colgroup>
1776 <tbody><tr>
1777 <td class="parameter_name"><p>node</p></td>
1778 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of type <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1779 <td class="parameter_annotations"> </td>
1780 </tr></tbody>
1781 </table></div>
1782 </div>
1783 <div class="refsect3">
1784 <a name="json-node-get-int.returns"></a><h4>Returns</h4>
1785 <p> an integer value.</p>
1786 </div>
1787 </div>
1788 <hr>
1789 <div class="refsect2">
1790 <a name="json-node-set-string"></a><h3>json_node_set_string ()</h3>
1791 <pre class="programlisting"><span class="returnvalue">void</span>
1792 json_node_set_string (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1793                       <em class="parameter"><code>const <span class="type">gchar</span> *value</code></em>);</pre>
1794 <p>Sets <em class="parameter"><code>value</code></em>
1795  as the string content of the <em class="parameter"><code>node</code></em>
1796 , replacing any existing
1797 content.</p>
1798 <p>It is an error to call this on an immutable node.</p>
1799 <div class="refsect3">
1800 <a name="json-node-set-string.parameters"></a><h4>Parameters</h4>
1801 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1802 <colgroup>
1803 <col width="150px" class="parameters_name">
1804 <col class="parameters_description">
1805 <col width="200px" class="parameters_annotations">
1806 </colgroup>
1807 <tbody>
1808 <tr>
1809 <td class="parameter_name"><p>node</p></td>
1810 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> initialized to <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1811 <td class="parameter_annotations"> </td>
1812 </tr>
1813 <tr>
1814 <td class="parameter_name"><p>value</p></td>
1815 <td class="parameter_description"><p>a string value</p></td>
1816 <td class="parameter_annotations"> </td>
1817 </tr>
1818 </tbody>
1819 </table></div>
1820 </div>
1821 </div>
1822 <hr>
1823 <div class="refsect2">
1824 <a name="json-node-get-string"></a><h3>json_node_get_string ()</h3>
1825 <pre class="programlisting">const <span class="returnvalue">gchar</span> *
1826 json_node_get_string (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1827 <p>Gets the string value stored inside a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. If the node does not hold a
1828 string value, <code class="literal">NULL</code> is returned.</p>
1829 <div class="refsect3">
1830 <a name="json-node-get-string.parameters"></a><h4>Parameters</h4>
1831 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1832 <colgroup>
1833 <col width="150px" class="parameters_name">
1834 <col class="parameters_description">
1835 <col width="200px" class="parameters_annotations">
1836 </colgroup>
1837 <tbody><tr>
1838 <td class="parameter_name"><p>node</p></td>
1839 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of type <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1840 <td class="parameter_annotations"> </td>
1841 </tr></tbody>
1842 </table></div>
1843 </div>
1844 <div class="refsect3">
1845 <a name="json-node-get-string.returns"></a><h4>Returns</h4>
1846 <p> a string value. </p>
1847 <p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1848 </div>
1849 </div>
1850 <hr>
1851 <div class="refsect2">
1852 <a name="json-node-dup-string"></a><h3>json_node_dup_string ()</h3>
1853 <pre class="programlisting"><span class="returnvalue">gchar</span> *
1854 json_node_dup_string (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1855 <p>Gets a copy of the string value stored inside a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>. If the node does
1856 not hold a string value, <code class="literal">NULL</code> is returned.</p>
1857 <div class="refsect3">
1858 <a name="json-node-dup-string.parameters"></a><h4>Parameters</h4>
1859 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1860 <colgroup>
1861 <col width="150px" class="parameters_name">
1862 <col class="parameters_description">
1863 <col width="200px" class="parameters_annotations">
1864 </colgroup>
1865 <tbody><tr>
1866 <td class="parameter_name"><p>node</p></td>
1867 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of type <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-VALUE:CAPS"><code class="literal">JSON_NODE_VALUE</code></a></p></td>
1868 <td class="parameter_annotations"> </td>
1869 </tr></tbody>
1870 </table></div>
1871 </div>
1872 <div class="refsect3">
1873 <a name="json-node-dup-string.returns"></a><h4>Returns</h4>
1874 <p> a newly allocated string
1875 containing a copy of the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> contents. Use <code class="function">g_free()</code> to free the
1876 allocated resources. </p>
1877 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1878 </div>
1879 </div>
1880 <hr>
1881 <div class="refsect2">
1882 <a name="json-node-set-parent"></a><h3>json_node_set_parent ()</h3>
1883 <pre class="programlisting"><span class="returnvalue">void</span>
1884 json_node_set_parent (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>,
1885                       <em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *parent</code></em>);</pre>
1886 <p>Sets the parent <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of <em class="parameter"><code>node</code></em>
1887 .</p>
1888 <p>It is an error to call this with an immutable <em class="parameter"><code>parent</code></em>
1889 . <em class="parameter"><code>node</code></em>
1890  may be
1891 immutable.</p>
1892 <div class="refsect3">
1893 <a name="json-node-set-parent.parameters"></a><h4>Parameters</h4>
1894 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1895 <colgroup>
1896 <col width="150px" class="parameters_name">
1897 <col class="parameters_description">
1898 <col width="200px" class="parameters_annotations">
1899 </colgroup>
1900 <tbody>
1901 <tr>
1902 <td class="parameter_name"><p>node</p></td>
1903 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1904 <td class="parameter_annotations"> </td>
1905 </tr>
1906 <tr>
1907 <td class="parameter_name"><p>parent</p></td>
1908 <td class="parameter_description"><p> the parent <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of <em class="parameter"><code>node</code></em>
1909 . </p></td>
1910 <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
1911 </tr>
1912 </tbody>
1913 </table></div>
1914 </div>
1915 <p class="since">Since: <a class="link" href="ix05.html#api-index-0.8">0.8</a></p>
1916 </div>
1917 <hr>
1918 <div class="refsect2">
1919 <a name="json-node-get-parent"></a><h3>json_node_get_parent ()</h3>
1920 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="returnvalue">JsonNode</span></a> *
1921 json_node_get_parent (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1922 <p>Retrieves the parent <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> of <em class="parameter"><code>node</code></em>
1923 .</p>
1924 <div class="refsect3">
1925 <a name="json-node-get-parent.parameters"></a><h4>Parameters</h4>
1926 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1927 <colgroup>
1928 <col width="150px" class="parameters_name">
1929 <col class="parameters_description">
1930 <col width="200px" class="parameters_annotations">
1931 </colgroup>
1932 <tbody><tr>
1933 <td class="parameter_name"><p>node</p></td>
1934 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1935 <td class="parameter_annotations"> </td>
1936 </tr></tbody>
1937 </table></div>
1938 </div>
1939 <div class="refsect3">
1940 <a name="json-node-get-parent.returns"></a><h4>Returns</h4>
1941 <p> the parent node, or <code class="literal">NULL</code> if <em class="parameter"><code>node</code></em>
1942 is the root node. </p>
1943 <p><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></p>
1944 </div>
1945 </div>
1946 <hr>
1947 <div class="refsect2">
1948 <a name="json-node-type-name"></a><h3>json_node_type_name ()</h3>
1949 <pre class="programlisting">const <span class="returnvalue">gchar</span> *
1950 json_node_type_name (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1951 <p>Retrieves the user readable name of the data type contained by <em class="parameter"><code>node</code></em>
1952 .</p>
1953 <div class="refsect3">
1954 <a name="json-node-type-name.parameters"></a><h4>Parameters</h4>
1955 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1956 <colgroup>
1957 <col width="150px" class="parameters_name">
1958 <col class="parameters_description">
1959 <col width="200px" class="parameters_annotations">
1960 </colgroup>
1961 <tbody><tr>
1962 <td class="parameter_name"><p>node</p></td>
1963 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1964 <td class="parameter_annotations"> </td>
1965 </tr></tbody>
1966 </table></div>
1967 </div>
1968 <div class="refsect3">
1969 <a name="json-node-type-name.returns"></a><h4>Returns</h4>
1970 <p> a string containing the name of the type. The returned string
1971 is owned by the node and should never be modified or freed</p>
1972 </div>
1973 </div>
1974 <hr>
1975 <div class="refsect2">
1976 <a name="json-node-get-value-type"></a><h3>json_node_get_value_type ()</h3>
1977 <pre class="programlisting"><span class="returnvalue">GType</span>
1978 json_node_get_value_type (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
1979 <p>Returns the <span class="type">GType</span> of the payload of the node.</p>
1980 <div class="refsect3">
1981 <a name="json-node-get-value-type.parameters"></a><h4>Parameters</h4>
1982 <div class="informaltable"><table class="informaltable" width="100%" border="0">
1983 <colgroup>
1984 <col width="150px" class="parameters_name">
1985 <col class="parameters_description">
1986 <col width="200px" class="parameters_annotations">
1987 </colgroup>
1988 <tbody><tr>
1989 <td class="parameter_name"><p>node</p></td>
1990 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
1991 <td class="parameter_annotations"> </td>
1992 </tr></tbody>
1993 </table></div>
1994 </div>
1995 <div class="refsect3">
1996 <a name="json-node-get-value-type.returns"></a><h4>Returns</h4>
1997 <p> a <span class="type">GType</span> for the payload.</p>
1998 </div>
1999 <p class="since">Since: <a class="link" href="ix03.html#api-index-0.4">0.4</a></p>
2000 </div>
2001 <hr>
2002 <div class="refsect2">
2003 <a name="json-node-get-node-type"></a><h3>json_node_get_node_type ()</h3>
2004 <pre class="programlisting"><a class="link" href="json-glib-JSON-Node.html#JsonNodeType" title="enum JsonNodeType"><span class="returnvalue">JsonNodeType</span></a>
2005 json_node_get_node_type (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
2006 <p>Retrieves the <a class="link" href="json-glib-JSON-Node.html#JsonNodeType" title="enum JsonNodeType"><span class="type">JsonNodeType</span></a> of <em class="parameter"><code>node</code></em>
2007 </p>
2008 <div class="refsect3">
2009 <a name="json-node-get-node-type.parameters"></a><h4>Parameters</h4>
2010 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2011 <colgroup>
2012 <col width="150px" class="parameters_name">
2013 <col class="parameters_description">
2014 <col width="200px" class="parameters_annotations">
2015 </colgroup>
2016 <tbody><tr>
2017 <td class="parameter_name"><p>node</p></td>
2018 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
2019 <td class="parameter_annotations"> </td>
2020 </tr></tbody>
2021 </table></div>
2022 </div>
2023 <div class="refsect3">
2024 <a name="json-node-get-node-type.returns"></a><h4>Returns</h4>
2025 <p> the type of the node</p>
2026 </div>
2027 <p class="since">Since: <a class="link" href="ix05.html#api-index-0.8">0.8</a></p>
2028 </div>
2029 <hr>
2030 <div class="refsect2">
2031 <a name="json-node-is-null"></a><h3>json_node_is_null ()</h3>
2032 <pre class="programlisting"><span class="returnvalue">gboolean</span>
2033 json_node_is_null (<em class="parameter"><code><a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a> *node</code></em>);</pre>
2034 <p>Checks whether <em class="parameter"><code>node</code></em>
2035  is a <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-NULL:CAPS"><code class="literal">JSON_NODE_NULL</code></a>.</p>
2036 <p>A <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-NULL:CAPS"><code class="literal">JSON_NODE_NULL</code></a> node is not the same as a <code class="literal">NULL</code> <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>; a
2037 <a class="link" href="json-glib-JSON-Node.html#JSON-NODE-NULL:CAPS"><code class="literal">JSON_NODE_NULL</code></a> represents a 'null' value in the JSON tree.</p>
2038 <div class="refsect3">
2039 <a name="json-node-is-null.parameters"></a><h4>Parameters</h4>
2040 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2041 <colgroup>
2042 <col width="150px" class="parameters_name">
2043 <col class="parameters_description">
2044 <col width="200px" class="parameters_annotations">
2045 </colgroup>
2046 <tbody><tr>
2047 <td class="parameter_name"><p>node</p></td>
2048 <td class="parameter_description"><p>a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a></p></td>
2049 <td class="parameter_annotations"> </td>
2050 </tr></tbody>
2051 </table></div>
2052 </div>
2053 <div class="refsect3">
2054 <a name="json-node-is-null.returns"></a><h4>Returns</h4>
2055 <p> <code class="literal">TRUE</code> if the node is null</p>
2056 </div>
2057 <p class="since">Since: <a class="link" href="ix05.html#api-index-0.8">0.8</a></p>
2058 </div>
2059 <hr>
2060 <div class="refsect2">
2061 <a name="json-string-hash"></a><h3>json_string_hash ()</h3>
2062 <pre class="programlisting"><span class="returnvalue">guint</span>
2063 json_string_hash (<em class="parameter"><code><span class="type">gconstpointer</span> key</code></em>);</pre>
2064 <p>Calculate a hash value for the given <em class="parameter"><code>key</code></em>
2065  (a UTF-8 JSON string).</p>
2066 <p>Note: Member names are compared byte-wise, without applying any Unicode
2067 decomposition or normalisation. This is not explicitly mentioned in the JSON
2068 standard (ECMA-404), but is assumed.</p>
2069 <div class="refsect3">
2070 <a name="json-string-hash.parameters"></a><h4>Parameters</h4>
2071 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2072 <colgroup>
2073 <col width="150px" class="parameters_name">
2074 <col class="parameters_description">
2075 <col width="200px" class="parameters_annotations">
2076 </colgroup>
2077 <tbody><tr>
2078 <td class="parameter_name"><p>key</p></td>
2079 <td class="parameter_description"><p> a JSON string to hash. </p></td>
2080 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></td>
2081 </tr></tbody>
2082 </table></div>
2083 </div>
2084 <div class="refsect3">
2085 <a name="json-string-hash.returns"></a><h4>Returns</h4>
2086 <p> hash value for <em class="parameter"><code>key</code></em>
2087 </p>
2088 </div>
2089 <p class="since">Since: <a class="link" href="ix11.html#api-index-1.2">1.2</a></p>
2090 </div>
2091 <hr>
2092 <div class="refsect2">
2093 <a name="json-string-equal"></a><h3>json_string_equal ()</h3>
2094 <pre class="programlisting"><span class="returnvalue">gboolean</span>
2095 json_string_equal (<em class="parameter"><code><span class="type">gconstpointer</span> a</code></em>,
2096                    <em class="parameter"><code><span class="type">gconstpointer</span> b</code></em>);</pre>
2097 <p>Check whether <em class="parameter"><code>a</code></em>
2098  and <em class="parameter"><code>b</code></em>
2099  are equal UTF-8 JSON strings.</p>
2100 <div class="refsect3">
2101 <a name="json-string-equal.parameters"></a><h4>Parameters</h4>
2102 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2103 <colgroup>
2104 <col width="150px" class="parameters_name">
2105 <col class="parameters_description">
2106 <col width="200px" class="parameters_annotations">
2107 </colgroup>
2108 <tbody>
2109 <tr>
2110 <td class="parameter_name"><p>a</p></td>
2111 <td class="parameter_description"><p> a JSON string. </p></td>
2112 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></td>
2113 </tr>
2114 <tr>
2115 <td class="parameter_name"><p>b</p></td>
2116 <td class="parameter_description"><p> another JSON string. </p></td>
2117 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></td>
2118 </tr>
2119 </tbody>
2120 </table></div>
2121 </div>
2122 <div class="refsect3">
2123 <a name="json-string-equal.returns"></a><h4>Returns</h4>
2124 <p> <code class="literal">TRUE</code> if <em class="parameter"><code>a</code></em>
2125 and <em class="parameter"><code>b</code></em>
2126 are equal; <code class="literal">FALSE</code> otherwise</p>
2127 </div>
2128 <p class="since">Since: <a class="link" href="ix11.html#api-index-1.2">1.2</a></p>
2129 </div>
2130 <hr>
2131 <div class="refsect2">
2132 <a name="json-string-compare"></a><h3>json_string_compare ()</h3>
2133 <pre class="programlisting"><span class="returnvalue">gint</span>
2134 json_string_compare (<em class="parameter"><code><span class="type">gconstpointer</span> a</code></em>,
2135                      <em class="parameter"><code><span class="type">gconstpointer</span> b</code></em>);</pre>
2136 <p>Check whether <em class="parameter"><code>a</code></em>
2137  and <em class="parameter"><code>b</code></em>
2138  are equal UTF-8 JSON strings and return an ordering
2139 over them in <code class="function">strcmp()</code> style.</p>
2140 <div class="refsect3">
2141 <a name="json-string-compare.parameters"></a><h4>Parameters</h4>
2142 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2143 <colgroup>
2144 <col width="150px" class="parameters_name">
2145 <col class="parameters_description">
2146 <col width="200px" class="parameters_annotations">
2147 </colgroup>
2148 <tbody>
2149 <tr>
2150 <td class="parameter_name"><p>a</p></td>
2151 <td class="parameter_description"><p> a JSON string. </p></td>
2152 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></td>
2153 </tr>
2154 <tr>
2155 <td class="parameter_name"><p>b</p></td>
2156 <td class="parameter_description"><p> another JSON string. </p></td>
2157 <td class="parameter_annotations"><span class="annotation">[<acronym title="Override the parsed C type with given type."><span class="acronym">type</span></acronym> utf8]</span></td>
2158 </tr>
2159 </tbody>
2160 </table></div>
2161 </div>
2162 <div class="refsect3">
2163 <a name="json-string-compare.returns"></a><h4>Returns</h4>
2164 <p> an integer less than zero if <em class="parameter"><code>a</code></em>
2165 &lt; <em class="parameter"><code>b</code></em>
2166 , equal to zero if <em class="parameter"><code>a</code></em>
2167 == <em class="parameter"><code>b</code></em>
2168 , and
2169 greater than zero if <em class="parameter"><code>a</code></em>
2170 &gt; <em class="parameter"><code>b</code></em>
2171 </p>
2172 </div>
2173 <p class="since">Since: <a class="link" href="ix11.html#api-index-1.2">1.2</a></p>
2174 </div>
2175 </div>
2176 <div class="refsect1">
2177 <a name="json-glib-JSON-Node.other_details"></a><h2>Types and Values</h2>
2178 <div class="refsect2">
2179 <a name="JsonNodeType"></a><h3>enum JsonNodeType</h3>
2180 <p>Indicates the content of a <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>.</p>
2181 <div class="refsect3">
2182 <a name="JsonNodeType.members"></a><h4>Members</h4>
2183 <div class="informaltable"><table class="informaltable" width="100%" border="0">
2184 <colgroup>
2185 <col width="300px" class="enum_members_name">
2186 <col class="enum_members_description">
2187 <col width="200px" class="enum_members_annotations">
2188 </colgroup>
2189 <tbody>
2190 <tr>
2191 <td class="enum_member_name"><p><a name="JSON-NODE-OBJECT:CAPS"></a>JSON_NODE_OBJECT</p></td>
2192 <td class="enum_member_description">
2193 <p>The node contains a <a class="link" href="json-glib-JSON-Object.html#JsonObject"><span class="type">JsonObject</span></a></p>
2194 </td>
2195 <td class="enum_member_annotations"> </td>
2196 </tr>
2197 <tr>
2198 <td class="enum_member_name"><p><a name="JSON-NODE-ARRAY:CAPS"></a>JSON_NODE_ARRAY</p></td>
2199 <td class="enum_member_description">
2200 <p>The node contains a <a class="link" href="json-glib-JSON-Array.html#JsonArray"><span class="type">JsonArray</span></a></p>
2201 </td>
2202 <td class="enum_member_annotations"> </td>
2203 </tr>
2204 <tr>
2205 <td class="enum_member_name"><p><a name="JSON-NODE-VALUE:CAPS"></a>JSON_NODE_VALUE</p></td>
2206 <td class="enum_member_description">
2207 <p>The node contains a fundamental type</p>
2208 </td>
2209 <td class="enum_member_annotations"> </td>
2210 </tr>
2211 <tr>
2212 <td class="enum_member_name"><p><a name="JSON-NODE-NULL:CAPS"></a>JSON_NODE_NULL</p></td>
2213 <td class="enum_member_description">
2214 <p>Special type, for nodes containing null</p>
2215 </td>
2216 <td class="enum_member_annotations"> </td>
2217 </tr>
2218 </tbody>
2219 </table></div>
2220 </div>
2221 </div>
2222 <hr>
2223 <div class="refsect2">
2224 <a name="JsonNode-struct"></a><h3>JsonNode</h3>
2225 <pre class="programlisting">typedef struct _JsonNode JsonNode;</pre>
2226 <p>A generic container of JSON data types. The contents of the <a class="link" href="json-glib-JSON-Node.html#JsonNode"><span class="type">JsonNode</span></a>
2227 structure are private and should only be accessed via the provided
2228 functions and never directly.</p>
2229 </div>
2230 </div>
2231 </div>
2232 <div class="footer">
2233 <hr>Generated by GTK-Doc V1.25.1</div>
2234 </body>
2235 </html>