Method
JsonSerializabledefault_serialize_property
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 |
const gchar* |
The name of the property to serialize. |
|
The data is owned by the caller of the function. | |
The string is a NUL terminated UTF-8 string. | |
value |
const GValue* |
The value of the property to serialize. |
|
The data is owned by the caller of the function. | |
pspec |
GParamSpec* |
A property description. |
|
The data is owned by the caller of the function. |
Return value
Returns: | JsonNode |
A node containing the serialized property. |
|
The caller of the method takes ownership of the data, and is responsible for freeing it. | |
The return value can be NULL . |