Method
JsonSerializabledefault_serialize_property
since: 0.10
Declaration [src]
JsonNode*
json_serializable_default_serialize_property (
JsonSerializable* serializable,
const gchar* property_name,
const GValue* value,
GParamSpec* pspec
)
Description [src]
Calls the default implementation of the Json.SerializableIface.serialize_property
virtual function.
This function can be used inside a custom implementation of the
serialize_property()
virtual function in lieu of calling the
default implementation through g_type_default_interface_peek()
:
JsonSerializable *iface;
JsonNode *node;
iface = g_type_default_interface_peek (JSON_TYPE_SERIALIZABLE);
node = iface->serialize_property (serializable, property_name,
value,
pspec);
This function will return NULL
if the property could not be serialized.
Available since: 0.10
Parameters
property_name
-
Type:
const gchar*
The name of the property to serialize.
The data is owned by the caller of the method. The value is a NUL terminated UTF-8 string. value
-
Type:
GValue
The value of the property to serialize.
The data is owned by the caller of the method. pspec
-
Type:
GParamSpec
A property description.
The data is owned by the caller of the method.
Return value
Type: JsonNode
A node containing the serialized property.
The caller of the method takes ownership of the returned data, and is responsible for freeing it. |
The return value can be NULL . |