gobjectFromData
fn
gobject.object.ObjectWrap gobjectFromData(gobject.types.GType gtype, string data)Deserializes a JSON data stream and creates an instance of the given type.
If the type implements the json.serializable.Serializable interface, it will be asked to deserialize all the JSON members into their respective properties; otherwise, the default implementation will be used to translate the compatible JSON native types.
Note: the JSON data stream must be an object
Parameters
gtype | the type of the object to construct |
data | a JSON data stream |
Returns
a new object instance of the given type