summaryrefslogtreecommitdiff
path: root/json-glib/json-gobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'json-glib/json-gobject.c')
-rw-r--r--json-glib/json-gobject.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c
index 73ecaac..0b91a5e 100644
--- a/json-glib/json-gobject.c
+++ b/json-glib/json-gobject.c
@@ -400,13 +400,6 @@ json_gobject_dump (GObject *gobject)
else
g_object_get_property (gobject, pspec->name, &value);
- /* skip if the value is the default for the property */
- if (g_param_value_defaults (pspec, &value))
- {
- g_value_unset (&value);
- continue;
- }
-
/* if there is a serialization vfunc, then it is completely responsible
* for serializing the property, possibly by calling the implementation
* of the default JsonSerializable interface through chaining up
@@ -417,7 +410,8 @@ json_gobject_dump (GObject *gobject)
&value,
pspec);
}
- else
+ /* skip if the value is the default for the property */
+ else if (!g_param_value_defaults (pspec, &value))
node = json_serialize_pspec (&value, pspec);
if (node)