Method
JsonNodeset_value
Declaration [src]
void
json_node_set_value (
JsonNode* node,
const GValue* value
)
Description [src]
Sets a scalar value inside the given node.
The contents of the given GValue are copied into the JsonNode.
The following GValue types have a direct mapping to JSON types:
G_TYPE_INT64G_TYPE_DOUBLEG_TYPE_BOOLEANG_TYPE_STRING
JSON-GLib will also automatically promote the following GValue types:
G_TYPE_INTtoG_TYPE_INT64G_TYPE_FLOATtoG_TYPE_DOUBLE
It is an error to call this on an immutable node, or on a node which is not a value node.
Parameters
value-
Type:
GValueThe value to set.
The data is owned by the caller of the method.