Method

JsonSerializabledeserialize_property

Declaration [src]

gboolean
json_serializable_deserialize_property (
  JsonSerializable* serializable,
  const gchar* property_name,
  GValue* value,
  GParamSpec* pspec,
  JsonNode* property_node
)

Description [src]

Asks a JsonSerializable implementation to deserialize the property contained inside property_node and place its value into value.

The value can be:

  • an empty GValue initialized by G_VALUE_INIT, which will be automatically initialized with the expected type of the property by using the given property description (since JSON-GLib 1.6)
  • a GValue initialized with the expected type of the property

This function will not be called for properties that are marked as as G_PARAM_CONSTRUCT_ONLY.

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

A pointer to an uninitialized value.

The argument will be set by the function.
The returned data is owned by the instance.
pspec

Type: GParamSpec

A property description.

The data is owned by the caller of the method.
property_node

Type: JsonNode

The JSON node containing the serialized property.

The data is owned by the caller of the method.

Return value

Type: gboolean

TRUE if the property was successfully deserialized.