Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:01:42

0001 /* json-types.h - JSON data types
0002  * 
0003  * This file is part of JSON-GLib
0004  * Copyright (C) 2007  OpenedHand Ltd.
0005  * Copyright (C) 2009  Intel Corp.
0006  *
0007  * This library is free software; you can redistribute it and/or
0008  * modify it under the terms of the GNU Lesser General Public
0009  * License as published by the Free Software Foundation; either
0010  * version 2.1 of the License, or (at your option) any later version.
0011  *
0012  * This library is distributed in the hope that it will be useful,
0013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0015  * Lesser General Public License for more details.
0016  *
0017  * You should have received a copy of the GNU Lesser General Public
0018  * License along with this library. If not, see <http://www.gnu.org/licenses/>.
0019  *
0020  * Author:
0021  *   Emmanuele Bassi  <ebassi@linux.intel.com>
0022  */
0023 
0024 #ifndef __JSON_TYPES_H__
0025 #define __JSON_TYPES_H__
0026 
0027 #if !defined(__JSON_GLIB_INSIDE__) && !defined(JSON_COMPILATION)
0028 #error "Only <json-glib/json-glib.h> can be included directly."
0029 #endif
0030 
0031 #include <glib-object.h>
0032 #include <json-glib/json-version-macros.h>
0033 
0034 G_BEGIN_DECLS
0035 
0036 /**
0037  * JSON_NODE_TYPE:
0038  * @node: (type Json.Node): the [struct@Json.Node] to check
0039  *
0040  * Evaluates to the [enum@Json.NodeType] value contained by the node.
0041  */
0042 #define JSON_NODE_TYPE(node)    (json_node_get_node_type ((node)))
0043 
0044 /**
0045  * JSON_NODE_HOLDS:
0046  * @node: (type Json.Node): the [struct@Json.Node] to check
0047  * @t: (type Json.NodeType): the desired [enum@Json.NodeType]
0048  *
0049  * Evaluates to `TRUE` if the node holds the given type.
0050  *
0051  * Since: 0.10
0052  */
0053 #define JSON_NODE_HOLDS(node,t)         (json_node_get_node_type ((node)) == (t))
0054 
0055 /**
0056  * JSON_NODE_HOLDS_VALUE:
0057  * @node: (type Json.Node): the [struct@Json.Node] to check
0058  *
0059  * Evaluates to `TRUE` if the node holds a scalar value.
0060  *
0061  * Since: 0.10
0062  */
0063 #define JSON_NODE_HOLDS_VALUE(node)     (JSON_NODE_HOLDS ((node), JSON_NODE_VALUE))
0064 
0065 /**
0066  * JSON_NODE_HOLDS_OBJECT:
0067  * @node: (type Json.Node): the [struct@Json.Node] to check
0068  *
0069  * Evaluates to `TRUE` if the node holds a JSON object.
0070  *
0071  * Since: 0.10
0072  */
0073 #define JSON_NODE_HOLDS_OBJECT(node)    (JSON_NODE_HOLDS ((node), JSON_NODE_OBJECT))
0074 
0075 /**
0076  * JSON_NODE_HOLDS_ARRAY:
0077  * @node: (type Json.Node): the [struct@Json.Node] to check
0078  *
0079  * Evaluates to `TRUE` if the node holds a JSON array.
0080  *
0081  * Since: 0.10
0082  */
0083 #define JSON_NODE_HOLDS_ARRAY(node)     (JSON_NODE_HOLDS ((node), JSON_NODE_ARRAY))
0084 
0085 /**
0086  * JSON_NODE_HOLDS_NULL:
0087  * @node: (type Json.Node): the [struct@Json.Node] to check
0088  *
0089  * Evaluates to `TRUE` if the node holds `null`.
0090  *
0091  * Since: 0.10
0092  */
0093 #define JSON_NODE_HOLDS_NULL(node)      (JSON_NODE_HOLDS ((node), JSON_NODE_NULL))
0094 
0095 #define JSON_TYPE_NODE          (json_node_get_type ())
0096 #define JSON_TYPE_OBJECT        (json_object_get_type ())
0097 #define JSON_TYPE_ARRAY         (json_array_get_type ())
0098 
0099 typedef struct _JsonNode        JsonNode;
0100 typedef struct _JsonObject      JsonObject;
0101 typedef struct _JsonArray       JsonArray;
0102 
0103 /**
0104  * JsonNodeType:
0105  * @JSON_NODE_OBJECT: The node contains a JSON object
0106  * @JSON_NODE_ARRAY: The node contains a JSON array
0107  * @JSON_NODE_VALUE: The node contains a fundamental type
0108  * @JSON_NODE_NULL: Special type, for nodes containing null
0109  *
0110  * Indicates the content of a node.
0111  */
0112 typedef enum {
0113   JSON_NODE_OBJECT,
0114   JSON_NODE_ARRAY,
0115   JSON_NODE_VALUE,
0116   JSON_NODE_NULL
0117 } JsonNodeType;
0118 
0119 /**
0120  * JsonObjectForeach:
0121  * @object: the iterated JSON object
0122  * @member_name: the name of the member
0123  * @member_node: the value of the member
0124  * @user_data: data passed to the function
0125  *
0126  * The function to be passed to [method@Json.Object.foreach_member].
0127  *
0128  * You should not add or remove members to and from @object within
0129  * this function.
0130  *
0131  * It is safe to change the value of @member_node.
0132  *
0133  * Since: 0.8
0134  */
0135 typedef void (* JsonObjectForeach) (JsonObject  *object,
0136                                     const gchar *member_name,
0137                                     JsonNode    *member_node,
0138                                     gpointer     user_data);
0139 
0140 /**
0141  * JsonArrayForeach:
0142  * @array: the iterated JSON array
0143  * @index_: the index of the element
0144  * @element_node: the value of the element at the given @index_
0145  * @user_data: data passed to the function
0146  *
0147  * The function to be passed to [method@Json.Array.foreach_element].
0148  *
0149  * You should not add or remove elements to and from @array within
0150  * this function.
0151  *
0152  * It is safe to change the value of @element_node.
0153  *
0154  * Since: 0.8
0155  */
0156 typedef void (* JsonArrayForeach) (JsonArray  *array,
0157                                    guint       index_,
0158                                    JsonNode   *element_node,
0159                                    gpointer    user_data);
0160 
0161 /*
0162  * JsonNode
0163  */
0164 
0165 JSON_AVAILABLE_IN_1_0
0166 GType                 json_node_get_type        (void) G_GNUC_CONST;
0167 JSON_AVAILABLE_IN_1_0
0168 JsonNode *            json_node_new             (JsonNodeType  type);
0169 
0170 JSON_AVAILABLE_IN_1_0
0171 JsonNode *            json_node_alloc           (void);
0172 JSON_AVAILABLE_IN_1_0
0173 JsonNode *            json_node_init            (JsonNode     *node,
0174                                                  JsonNodeType  type);
0175 JSON_AVAILABLE_IN_1_0
0176 JsonNode *            json_node_init_object     (JsonNode     *node,
0177                                                  JsonObject   *object);
0178 JSON_AVAILABLE_IN_1_0
0179 JsonNode *            json_node_init_array      (JsonNode     *node,
0180                                                  JsonArray    *array);
0181 JSON_AVAILABLE_IN_1_0
0182 JsonNode *            json_node_init_int        (JsonNode     *node,
0183                                                  gint64        value);
0184 JSON_AVAILABLE_IN_1_0
0185 JsonNode *            json_node_init_double     (JsonNode     *node,
0186                                                  gdouble       value);
0187 JSON_AVAILABLE_IN_1_0
0188 JsonNode *            json_node_init_boolean    (JsonNode     *node,
0189                                                  gboolean      value);
0190 JSON_AVAILABLE_IN_1_0
0191 JsonNode *            json_node_init_string     (JsonNode     *node,
0192                                                  const char   *value);
0193 JSON_AVAILABLE_IN_1_0
0194 JsonNode *            json_node_init_null       (JsonNode     *node);
0195 
0196 JSON_AVAILABLE_IN_1_0
0197 JsonNode *            json_node_copy            (JsonNode     *node);
0198 JSON_AVAILABLE_IN_1_0
0199 void                  json_node_free            (JsonNode     *node);
0200 
0201 JSON_AVAILABLE_IN_1_2
0202 JsonNode *            json_node_ref             (JsonNode     *node);
0203 JSON_AVAILABLE_IN_1_2
0204 void                  json_node_unref           (JsonNode     *node);
0205 
0206 JSON_AVAILABLE_IN_1_0
0207 JsonNodeType          json_node_get_node_type   (JsonNode     *node);
0208 JSON_AVAILABLE_IN_1_0
0209 GType                 json_node_get_value_type  (JsonNode     *node);
0210 JSON_AVAILABLE_IN_1_0
0211 void                  json_node_set_parent      (JsonNode     *node,
0212                                                  JsonNode     *parent);
0213 JSON_AVAILABLE_IN_1_0
0214 JsonNode *            json_node_get_parent      (JsonNode     *node);
0215 JSON_AVAILABLE_IN_1_0
0216 const gchar *         json_node_type_name       (JsonNode     *node);
0217 
0218 JSON_AVAILABLE_IN_1_0
0219 void                  json_node_set_object      (JsonNode     *node,
0220                                                  JsonObject   *object);
0221 JSON_AVAILABLE_IN_1_0
0222 void                  json_node_take_object     (JsonNode     *node,
0223                                                  JsonObject   *object);
0224 JSON_AVAILABLE_IN_1_0
0225 JsonObject *          json_node_get_object      (JsonNode     *node);
0226 JSON_AVAILABLE_IN_1_0
0227 JsonObject *          json_node_dup_object      (JsonNode     *node);
0228 JSON_AVAILABLE_IN_1_0
0229 void                  json_node_set_array       (JsonNode     *node,
0230                                                  JsonArray    *array);
0231 JSON_AVAILABLE_IN_1_0
0232 void                  json_node_take_array      (JsonNode     *node,
0233                                                  JsonArray    *array);
0234 JSON_AVAILABLE_IN_1_0
0235 JsonArray *           json_node_get_array       (JsonNode     *node);
0236 JSON_AVAILABLE_IN_1_0
0237 JsonArray *           json_node_dup_array       (JsonNode     *node);
0238 JSON_AVAILABLE_IN_1_0
0239 void                  json_node_set_value       (JsonNode     *node,
0240                                                  const GValue *value);
0241 JSON_AVAILABLE_IN_1_0
0242 void                  json_node_get_value       (JsonNode     *node,
0243                                                  GValue       *value);
0244 JSON_AVAILABLE_IN_1_0
0245 void                  json_node_set_string      (JsonNode     *node,
0246                                                  const gchar  *value);
0247 JSON_AVAILABLE_IN_1_0
0248 const gchar *         json_node_get_string      (JsonNode     *node);
0249 JSON_AVAILABLE_IN_1_0
0250 gchar *               json_node_dup_string      (JsonNode     *node);
0251 JSON_AVAILABLE_IN_1_0
0252 void                  json_node_set_int         (JsonNode     *node,
0253                                                  gint64        value);
0254 JSON_AVAILABLE_IN_1_0
0255 gint64                json_node_get_int         (JsonNode     *node);
0256 JSON_AVAILABLE_IN_1_0
0257 void                  json_node_set_double      (JsonNode     *node,
0258                                                  gdouble       value);
0259 JSON_AVAILABLE_IN_1_0
0260 gdouble               json_node_get_double      (JsonNode     *node);
0261 JSON_AVAILABLE_IN_1_0
0262 void                  json_node_set_boolean     (JsonNode     *node,
0263                                                  gboolean      value);
0264 JSON_AVAILABLE_IN_1_0
0265 gboolean              json_node_get_boolean     (JsonNode     *node);
0266 JSON_AVAILABLE_IN_1_0
0267 gboolean              json_node_is_null         (JsonNode     *node);
0268 
0269 JSON_AVAILABLE_IN_1_2
0270 void                  json_node_seal            (JsonNode     *node);
0271 JSON_AVAILABLE_IN_1_2
0272 gboolean              json_node_is_immutable    (JsonNode     *node);
0273 
0274 JSON_AVAILABLE_IN_1_2
0275 guint                 json_string_hash            (gconstpointer  key);
0276 JSON_AVAILABLE_IN_1_2
0277 gboolean              json_string_equal           (gconstpointer  a,
0278                                                    gconstpointer  b);
0279 JSON_AVAILABLE_IN_1_2
0280 gint                  json_string_compare         (gconstpointer  a,
0281                                                    gconstpointer  b);
0282 
0283 JSON_AVAILABLE_IN_1_2
0284 guint                 json_node_hash              (gconstpointer  key);
0285 JSON_AVAILABLE_IN_1_2
0286 gboolean              json_node_equal             (gconstpointer  a,
0287                                                    gconstpointer  b);
0288 
0289 /*
0290  * JsonObject
0291  */
0292 JSON_AVAILABLE_IN_1_0
0293 GType                 json_object_get_type           (void) G_GNUC_CONST;
0294 JSON_AVAILABLE_IN_1_0
0295 JsonObject *          json_object_new                (void);
0296 JSON_AVAILABLE_IN_1_0
0297 JsonObject *          json_object_ref                (JsonObject  *object);
0298 JSON_AVAILABLE_IN_1_0
0299 void                  json_object_unref              (JsonObject  *object);
0300 
0301 JSON_DEPRECATED_IN_1_0_FOR(json_object_set_member)
0302 void                  json_object_add_member         (JsonObject  *object,
0303                                                       const gchar *member_name,
0304                                                       JsonNode    *node);
0305 
0306 JSON_AVAILABLE_IN_1_0
0307 void                  json_object_set_member         (JsonObject  *object,
0308                                                       const gchar *member_name,
0309                                                       JsonNode    *node);
0310 JSON_AVAILABLE_IN_1_0
0311 void                  json_object_set_int_member     (JsonObject  *object,
0312                                                       const gchar *member_name,
0313                                                       gint64       value);
0314 JSON_AVAILABLE_IN_1_0
0315 void                  json_object_set_double_member  (JsonObject  *object,
0316                                                       const gchar *member_name,
0317                                                       gdouble      value);
0318 JSON_AVAILABLE_IN_1_0
0319 void                  json_object_set_boolean_member (JsonObject  *object,
0320                                                       const gchar *member_name,
0321                                                       gboolean     value);
0322 JSON_AVAILABLE_IN_1_0
0323 void                  json_object_set_string_member  (JsonObject  *object,
0324                                                       const gchar *member_name,
0325                                                       const gchar *value);
0326 JSON_AVAILABLE_IN_1_0
0327 void                  json_object_set_null_member    (JsonObject  *object,
0328                                                       const gchar *member_name);
0329 JSON_AVAILABLE_IN_1_0
0330 void                  json_object_set_array_member   (JsonObject  *object,
0331                                                       const gchar *member_name,
0332                                                       JsonArray   *value);
0333 JSON_AVAILABLE_IN_1_0
0334 void                  json_object_set_object_member  (JsonObject  *object,
0335                                                       const gchar *member_name,
0336                                                       JsonObject  *value);
0337 JSON_AVAILABLE_IN_1_0
0338 GList *               json_object_get_members        (JsonObject  *object);
0339 JSON_AVAILABLE_IN_1_0
0340 JsonNode *            json_object_get_member         (JsonObject  *object,
0341                                                       const gchar *member_name);
0342 JSON_AVAILABLE_IN_1_0
0343 JsonNode *            json_object_dup_member         (JsonObject  *object,
0344                                                       const gchar *member_name);
0345 JSON_AVAILABLE_IN_1_0
0346 gint64                json_object_get_int_member                        (JsonObject  *object,
0347                                                                          const gchar *member_name);
0348 JSON_AVAILABLE_IN_1_6
0349 gint64                json_object_get_int_member_with_default           (JsonObject  *object,
0350                                                                          const char  *member_name,
0351                                                                         gint64       default_value);
0352 JSON_AVAILABLE_IN_1_0
0353 gdouble               json_object_get_double_member                     (JsonObject  *object,
0354                                                                          const gchar *member_name);
0355 JSON_AVAILABLE_IN_1_6
0356 double                json_object_get_double_member_with_default        (JsonObject  *object,
0357                                                                          const char  *member_name,
0358                                                                          double       default_value);
0359 JSON_AVAILABLE_IN_1_0
0360 gboolean              json_object_get_boolean_member                    (JsonObject  *object,
0361                                                                          const gchar *member_name);
0362 JSON_AVAILABLE_IN_1_6
0363 gboolean              json_object_get_boolean_member_with_default       (JsonObject  *object,
0364                                                                          const char  *member_name,
0365                                                                          gboolean     default_value);
0366 JSON_AVAILABLE_IN_1_0
0367 const gchar *         json_object_get_string_member                     (JsonObject  *object,
0368                                                                          const gchar *member_name);
0369 JSON_AVAILABLE_IN_1_6
0370 const char *          json_object_get_string_member_with_default        (JsonObject  *object,
0371                                                                          const char  *member_name,
0372                                                                          const char  *default_value);
0373 JSON_AVAILABLE_IN_1_0
0374 gboolean              json_object_get_null_member    (JsonObject  *object,
0375                                                       const gchar *member_name);
0376 JSON_AVAILABLE_IN_1_0
0377 JsonArray *           json_object_get_array_member   (JsonObject  *object,
0378                                                       const gchar *member_name);
0379 JSON_AVAILABLE_IN_1_0
0380 JsonObject *          json_object_get_object_member  (JsonObject  *object,
0381                                                       const gchar *member_name);
0382 JSON_AVAILABLE_IN_1_0
0383 gboolean              json_object_has_member         (JsonObject  *object,
0384                                                       const gchar *member_name);
0385 JSON_AVAILABLE_IN_1_0
0386 void                  json_object_remove_member      (JsonObject  *object,
0387                                                       const gchar *member_name);
0388 JSON_AVAILABLE_IN_1_0
0389 GList *               json_object_get_values         (JsonObject  *object);
0390 JSON_AVAILABLE_IN_1_0
0391 guint                 json_object_get_size           (JsonObject  *object);
0392 JSON_AVAILABLE_IN_1_0
0393 void                  json_object_foreach_member     (JsonObject  *object,
0394                                                       JsonObjectForeach func,
0395                                                       gpointer     data);
0396 
0397 JSON_AVAILABLE_IN_1_2
0398 void                  json_object_seal               (JsonObject  *object);
0399 JSON_AVAILABLE_IN_1_2
0400 gboolean              json_object_is_immutable       (JsonObject  *object);
0401 
0402 JSON_AVAILABLE_IN_1_2
0403 guint                 json_object_hash               (gconstpointer key);
0404 JSON_AVAILABLE_IN_1_2
0405 gboolean              json_object_equal              (gconstpointer a,
0406                                                       gconstpointer b);
0407 
0408 /**
0409  * JsonObjectIter:
0410  *
0411  * An iterator object used to iterate over the members of a JSON object.
0412  *
0413  * `JsonObjectIter` must be allocated on the stack and initialised using
0414  * [method@Json.ObjectIter.init] or [method@Json.ObjectIter.init_ordered].
0415  *
0416  * The iterator is invalidated if the object is modified during
0417  * iteration.
0418  *
0419  * All the fields in the `JsonObjectIter` structure are private and should
0420  * never be accessed directly.
0421  *
0422  * Since: 1.2 
0423  */
0424 typedef struct {
0425   /*< private >*/
0426   gpointer priv_pointer[6];
0427   int      priv_int[2];
0428   gboolean priv_boolean[1];
0429 } JsonObjectIter;
0430 
0431 JSON_AVAILABLE_IN_1_2
0432 void                  json_object_iter_init          (JsonObjectIter  *iter,
0433                                                       JsonObject      *object);
0434 JSON_AVAILABLE_IN_1_2
0435 gboolean              json_object_iter_next          (JsonObjectIter  *iter,
0436                                                       const gchar    **member_name,
0437                                                       JsonNode       **member_node);
0438 
0439 JSON_AVAILABLE_IN_1_6
0440 void                  json_object_iter_init_ordered  (JsonObjectIter  *iter,
0441                                                       JsonObject      *object);
0442 JSON_AVAILABLE_IN_1_6
0443 gboolean              json_object_iter_next_ordered  (JsonObjectIter  *iter,
0444                                                       const char     **member_name,
0445                                                       JsonNode       **member_node);
0446 
0447 JSON_AVAILABLE_IN_1_0
0448 GType                 json_array_get_type            (void) G_GNUC_CONST;
0449 JSON_AVAILABLE_IN_1_0
0450 JsonArray *           json_array_new                 (void);
0451 JSON_AVAILABLE_IN_1_0
0452 JsonArray *           json_array_sized_new           (guint        n_elements);
0453 JSON_AVAILABLE_IN_1_0
0454 JsonArray *           json_array_ref                 (JsonArray   *array);
0455 JSON_AVAILABLE_IN_1_0
0456 void                  json_array_unref               (JsonArray   *array);
0457 JSON_AVAILABLE_IN_1_0
0458 void                  json_array_add_element         (JsonArray   *array,
0459                                                       JsonNode    *node);
0460 JSON_AVAILABLE_IN_1_0
0461 void                  json_array_add_int_element     (JsonArray   *array,
0462                                                       gint64       value);
0463 JSON_AVAILABLE_IN_1_0
0464 void                  json_array_add_double_element  (JsonArray   *array,
0465                                                       gdouble      value);
0466 JSON_AVAILABLE_IN_1_0
0467 void                  json_array_add_boolean_element (JsonArray   *array,
0468                                                       gboolean     value);
0469 JSON_AVAILABLE_IN_1_0
0470 void                  json_array_add_string_element  (JsonArray   *array,
0471                                                       const gchar *value);
0472 JSON_AVAILABLE_IN_1_0
0473 void                  json_array_add_null_element    (JsonArray   *array);
0474 JSON_AVAILABLE_IN_1_0
0475 void                  json_array_add_array_element   (JsonArray   *array,
0476                                                       JsonArray   *value);
0477 JSON_AVAILABLE_IN_1_0
0478 void                  json_array_add_object_element  (JsonArray   *array,
0479                                                       JsonObject  *value);
0480 JSON_AVAILABLE_IN_1_0
0481 GList *               json_array_get_elements        (JsonArray   *array);
0482 JSON_AVAILABLE_IN_1_0
0483 JsonNode *            json_array_get_element         (JsonArray   *array,
0484                                                       guint        index_);
0485 JSON_AVAILABLE_IN_1_0
0486 gint64                json_array_get_int_element     (JsonArray   *array,
0487                                                       guint        index_);
0488 JSON_AVAILABLE_IN_1_0
0489 gdouble               json_array_get_double_element  (JsonArray   *array,
0490                                                       guint        index_);
0491 JSON_AVAILABLE_IN_1_0
0492 gboolean              json_array_get_boolean_element (JsonArray   *array,
0493                                                       guint        index_);
0494 JSON_AVAILABLE_IN_1_0
0495 const gchar *         json_array_get_string_element  (JsonArray   *array,
0496                                                       guint        index_);
0497 JSON_AVAILABLE_IN_1_0
0498 gboolean              json_array_get_null_element    (JsonArray   *array,
0499                                                       guint        index_);
0500 JSON_AVAILABLE_IN_1_0
0501 JsonArray *           json_array_get_array_element   (JsonArray   *array,
0502                                                       guint        index_);
0503 JSON_AVAILABLE_IN_1_0
0504 JsonObject *          json_array_get_object_element  (JsonArray   *array,
0505                                                       guint        index_);
0506 JSON_AVAILABLE_IN_1_0
0507 JsonNode *            json_array_dup_element         (JsonArray   *array,
0508                                                       guint        index_);
0509 JSON_AVAILABLE_IN_1_0
0510 void                  json_array_remove_element      (JsonArray   *array,
0511                                                       guint        index_);
0512 JSON_AVAILABLE_IN_1_0
0513 guint                 json_array_get_length          (JsonArray   *array);
0514 JSON_AVAILABLE_IN_1_0
0515 void                  json_array_foreach_element     (JsonArray   *array,
0516                                                       JsonArrayForeach func,
0517                                                       gpointer     data);
0518 JSON_AVAILABLE_IN_1_2
0519 void                  json_array_seal                (JsonArray   *array);
0520 JSON_AVAILABLE_IN_1_2
0521 gboolean              json_array_is_immutable        (JsonArray   *array);
0522 
0523 JSON_AVAILABLE_IN_1_2
0524 guint                 json_array_hash                (gconstpointer key);
0525 JSON_AVAILABLE_IN_1_2
0526 gboolean              json_array_equal               (gconstpointer a,
0527                                                       gconstpointer b);
0528 
0529 #ifdef G_DEFINE_AUTOPTR_CLEANUP_FUNC
0530 G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonArray, json_array_unref)
0531 G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonObject, json_object_unref)
0532 G_DEFINE_AUTOPTR_CLEANUP_FUNC (JsonNode, json_node_unref)
0533 #endif
0534 
0535 G_END_DECLS
0536 
0537 #endif /* __JSON_TYPES_H__ */