json.serializable

Module for Serializable interface

Types 2

interfaceSerializable

json.serializable.Serializable is an interface for controlling the serialization and deserialization of gobject.object.ObjectWrap classes.

Implementing this interface allows controlling how the class is going to be serialized or deserialized by func@Json.construct_gobject and func@Json.serialize_gobject, respectively.

Methods
bool defaultDeserializeProperty(string propertyName, gobject.value.Value value, gobject.param_spec.ParamSpec pspec, json.node.Node propertyNode)Calls the default implementation of the `vfuncJson.Serializable.deserialize_property` virtual function.
json.node.Node defaultSerializeProperty(string propertyName, gobject.value.Value value, gobject.param_spec.ParamSpec pspec)Calls the default implementation of the `vfuncJson.Serializable.serialize_property` virtual function.
bool deserializeProperty(string propertyName, out gobject.value.Value value, gobject.param_spec.ParamSpec pspec, json.node.Node propertyNode)Asks a [json.serializable.Serializable] implementation to deserialize the property contained inside `property_node` and place its value into `value`.
gobject.param_spec.ParamSpec findProperty(string name)Calls the `vfuncJson.Serializable.find_property` implementation on the [json.serializable.Serializable] instance, which will return the property description for the given name.
void getProperty(gobject.param_spec.ParamSpec pspec, out gobject.value.Value value)Calls the `vfuncJson.Serializable.get_property` implementation on the [json.serializable.Serializable] instance, which will get the value of the given property.
gobject.param_spec.ParamSpec[] listProperties()Calls the `vfuncJson.Serializable.list_properties` implementation on the [json.serializable.Serializable] instance, which will return the list of serializable properties. Returns: the serializable ...
json.node.Node serializeProperty(string propertyName, gobject.value.Value value, gobject.param_spec.ParamSpec pspec)Asks a [json.serializable.Serializable] implementation to serialize an object property into a JSON node.
void setProperty(gobject.param_spec.ParamSpec pspec, gobject.value.Value value)Calls the `vfuncJson.Serializable.set_property` implementation on the [json.serializable.Serializable] instance, which will set the property with the given value.

Fluent builder implementation template for json.serializable.Serializable