Skip to main content

gobject_to_data

Function gobject_to_data 

Source
pub fn gobject_to_data(gobject: &impl IsA<Object>) -> (GString, usize)
Expand description

Serializes a GObject instance into a JSON data stream, iterating recursively over each property.

If the given object implements the Serializable interface, it will be asked to serialize all its properties; otherwise, the default implementation will be use to translate the compatible types into JSON native types.

§gobject

the object to serialize

§Returns

a JSON data stream representing the given object

§length

return value for the length of the buffer