summaryrefslogtreecommitdiff
path: root/json-glib/json-array.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@linux.intel.com>2009-10-27 17:53:34 +0000
committerEmmanuele Bassi <ebassi@linux.intel.com>2009-10-27 17:53:34 +0000
commitff986ee5b8df45255f4f5ab01be0bbad893bc55e (patch)
tree16d565e41225266c2d762f174d1f238c7c72d2d6 /json-glib/json-array.c
parent7f6a73a0964b66b15e8b5a9858b9bc76b010f67b (diff)
downloadjson-glib-ff986ee5b8df45255f4f5ab01be0bbad893bc55e.tar.gz
gobject: Add experimental GBoxed<->JSON transformation
Serializing and deserializing GBoxed types is fairly complicated currently. If a GObject implements JsonSerializable it is possible for the class to intercept the JsonNode, parse it manually and then set the value to the property. This leaves a hole opened for: • manual (de)serialization of GBoxed types • (de)serialization of GBoxed properties in classes not implementing JsonSerializable In order to serialize and deserialize a GBoxed JSON-GLib should provide a mechanism similar to the GValue transformation functions: when registering the boxed type the developer should also be able to register a serialization and a deserialization functions pair matching the tuple: (GBoxed type, JSON type) The serialization function would be: JsonNode *(* JsonBoxedSerializeFunc) (gconstpointer boxed); And, conversely, the deserialization function would be: gpointer (* JsonBoxedDeserializeFunc) (JsonNode *node); Obviously, the whole machinery works only for GBoxed types that register the serialization and deserialization functions.
Diffstat (limited to 'json-glib/json-array.c')
0 files changed, 0 insertions, 0 deletions