summaryrefslogtreecommitdiff
path: root/json-glib/json-gobject.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2009-11-23 22:20:58 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2009-11-23 22:20:58 +0000
commit3cf919e9c7f3201305a1a63a3c270e422a37efed (patch)
tree34d263f22b1e25f6557f8ce58c231244c6e0e96f /json-glib/json-gobject.c
parent61d54cc9e2a3098e876e700a9248428f400a5368 (diff)
downloadjson-glib-3cf919e9c7f3201305a1a63a3c270e422a37efed.tar.gz
boxed: Split (de)serialization registration
A GBoxed type defined as: struct Boxed { int foo; gboolean bar; int baz; }; Can be represented either by a JSON object: { "foo" : 1, "bar" : true, "baz" : 3 } Or by a JSON array: [ 1, true, 3 ] The current function for registering a serialization and a deserialization pair does not allow registering more than one deserialization function - which means that there can only be one way to deserialize a GBoxed type into a specific JsonNode type. To allow having more than one JsonNodeType associated to a GBoxed type and a deserialization function we need to split out the registration of the serialization and deserialization functions into two distinct functions.
Diffstat (limited to 'json-glib/json-gobject.c')
-rw-r--r--json-glib/json-gobject.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index 574ff38..0a98aa8 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -627,9 +627,7 @@ json_serialize_pspec (const GValue *real_value,
{
gpointer boxed = g_value_get_boxed (real_value);
- retval = json_boxed_serialize (G_VALUE_TYPE (real_value),
- node_type,
- boxed);
+ retval = json_boxed_serialize (G_VALUE_TYPE (real_value), boxed);
}
else
g_warning ("Boxed type '%s' is not handled by JSON-GLib",