[BZ#728509] Doesn't know how to serialize/deserialize its own boxed types
Submitted by Matthew Barnes <<mba..@..com>>
I have a case where I'm trying to deserialize JSON data into a complex object.
For technical reasons, part of that object is too complex to deserialize directly. So my solution was to define a boxed GObject property of type JSON_TYPE_OBJECT and just stash the raw data to be processed from my GInitable.init() method.
The property is construct-only, so implementing the JsonSerializable interface won't help me because json-glib can only use json_deserialize_pspec() for construct-only properties.
But I was surprised to find (at least afaict) json-glib doesn't know how to handle GObject properties of its own boxed types, like JsonObject or JsonArray. So I'm having to teach it how myself by registering serialize/deserialize callbacks.
Maybe I'm doing something wrong, but those cases seem trivial. Shouldn't they come built-in?