Valadoc | Vala | Tutorial | API-References | Markup

construct_gobject


Description:

[ Deprecated ( since = "0.10" , replacement = "Json.gobject_from_data" ) ]
public Object construct_gobject (Type gtype, string data, size_t length) throws Error

Warning: construct_gobject is deprecated. Use Json.gobject_from_data.

Deserializes a JSON data stream and creates the corresponding Object class. If gtype implements the Serializable interface, it will be asked to deserialize all the JSON members into the 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 declaration.

Parameters:

gtype the Type of object to construct
data a JSON data stream
length length of the data stream

Returns:

a Object or null

Namespace: Json
Package: json-glib-1.0