diff options
author | Emmanuele Bassi <ebassi@openedhand.com> | 2007-11-10 01:26:46 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@openedhand.com> | 2007-11-10 01:26:46 +0000 |
commit | 45c697263364a975fd6a54373f999f2932436b6f (patch) | |
tree | d8744258a70d42d4ddd74c77609c65193327df1d /json-glib/json-gobject.h | |
parent | 4eade1089355ebcf0614d0cfbc9c441513b7d97a (diff) | |
download | json-glib-45c697263364a975fd6a54373f999f2932436b6f.tar.gz |
Initial implementation of GObject deserialization function
The json_construct_gobject() function takes a GType and a JSON data stream
and constructs a new instance for the given type. If the type is a
JsonSerializable, it will use the JsonSerializable interface for parsing
the JsonNodes of each object member.
This is the initial implementation of the function: the JsonNode-to-GValue
fallback parser is just a stub.
Diffstat (limited to 'json-glib/json-gobject.h')
-rw-r--r-- | json-glib/json-gobject.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/json-glib/json-gobject.h b/json-glib/json-gobject.h index abd2f95..99cd3af 100644 --- a/json-glib/json-gobject.h +++ b/json-glib/json-gobject.h @@ -76,8 +76,12 @@ gboolean json_serializable_deserialize_property (JsonSerializable *serializable JsonNode *property_node); -gchar *json_serialize_gobject (GObject *gobject, - gsize *length); +GObject *json_construct_gobject (GType gtype, + const gchar *data, + gsize length, + GError **error); +gchar * json_serialize_gobject (GObject *gobject, + gsize *length) G_GNUC_MALLOC; G_END_DECLS |