Interface

Json-1.0JsonSerializableInterface

Interface for implementing Serializable. Contains only the virtual methods that need to be implemented.

interface Interface {
    vfunc_deserialize_property(
        property_name: string,
        pspec: GObject.ParamSpec,
        property_node: Json.Node,
    ): [boolean, unknown];
    vfunc_find_property(name: string): GObject.ParamSpec<unknown>;
    vfunc_get_property(pspec: GObject.ParamSpec): unknown;
    vfunc_get_property(...args: never[]): any;
    vfunc_serialize_property(
        property_name: string,
        value: any,
        pspec: GObject.ParamSpec,
    ): Json.Node;
    vfunc_set_property(pspec: GObject.ParamSpec, value: any): void;
    vfunc_set_property(...args: never[]): any;
}
Index

Methods

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

    The value can be:

    • an empty GObject.Value 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 GObject.Value 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: string

      the name of the property to serialize

    • pspec: GObject.ParamSpec

      a property description

    • property_node: Json.Node

      the JSON node containing the serialized property

    Returns [boolean, unknown]