Node
Object Hierarchy:
Description:
A generic container of JSON data types. The contents of the Node structure are private and
should only be accessed via the provided functions and never directly.
Namespace: Json
Package: json-glib-1.0
Content:
Creation methods:
Methods:
-
public Node copy ()
Copies node. If the node contains complex data types then the reference count of the
objects is increased.
-
public Array dup_array ()
Retrieves the Array stored inside a
Node and returns it with its reference count increased by one.
-
public Object dup_object ()
Retrieves the Object inside node. The
reference count of the returned object is increased.
-
public string dup_string ()
Gets a copy of the string value stored inside a Node
-
public void free ()
Frees the resources allocated by node.
-
public unowned Array get_array ()
-
public bool get_boolean ()
Gets the boolean value stored inside a Node
-
public double get_double ()
Gets the double value stored inside a Node
-
public int64 get_int ()
Gets the integer value stored inside a Node
-
public NodeType get_node_type ()
-
public unowned Object get_object ()
-
public unowned Node get_parent ()
Retrieves the parent Node of node.
-
public unowned string get_string ()
Gets the string value stored inside a Node
-
public Value get_value ()
Retrieves a value from a Node and copies into value
. When done using it, call unset on the
Value.
-
public Type get_value_type ()
Returns the Type of the payload of the node.
-
public bool is_null ()
Checks whether node is a NULL
-
public void set_array (Array array)
Sets array inside node and increases the
Array reference count
-
public void set_boolean (bool value)
Sets value as the boolean content of the node, replacing any existing content.
-
public void set_double (double value)
Sets value as the double content of the node, replacing any existing content.
-
public void set_int (int64 value)
Sets value as the integer content of the node, replacing any existing content.
-
public void set_object (Object object)
Sets objects inside node. The reference count of object is
increased.
-
public void set_parent (Node parent)
Sets the parent Node of node
-
public void set_string (string value)
Sets value as the string content of the node, replacing any existing content.
-
public void set_value (Value value)
Sets value inside node. The passed
Value is copied into the Node
-
public void take_array (owned Array array)
Sets array into node without increasing the
Array reference count.
-
public void take_object (owned Object object)
Sets object inside node. The reference count of object is not
increased.
-
public unowned string type_name ()
Retrieves the user readable name of the data type contained by node.