Json micro version component (e.g. 3 if JSON_VERSION
is "1.2.3")
Json minor version component (e.g. 2 if JSON_VERSION
is "1.2.3")
The version of JSON-GLib, encoded as a string, useful for printing and concatenation.
Deserializes a JSON data stream and creates an instance of the given type
If the given type implements the [ifaceJson
.Serializable] interface, it
will be asked to deserialize all the JSON members into their respective
properties; otherwise, the default implementation will be used to translate
the compatible JSON native types.
Note: the JSON data stream must be an object.
the type of the object to construct
a JSON data stream
length of the data stream
Creates a new GObject
instance of the given type, and constructs it
using the members of the object in the given node.
the type of the object to create
a node of type JSON_NODE_OBJECT
describing the object instance for the given type
Deserializes a JSON data stream and creates an instance of the given type.
If the type implements the [ifaceJson
.Serializable] interface, it will
be asked to deserialize all the JSON members into their respective properties;
otherwise, the default implementation will be used to translate the
compatible JSON native types.
Note: the JSON data stream must be an object
the type of the object to construct
a JSON data stream
length of the data stream, or -1 if it is NUL
-terminated
Serializes a GObject
instance into a JSON data stream, iterating
recursively over each property.
If the given object implements the [ifaceJson
.Serializable] interface,
it will be asked to serialize all its properties; otherwise, the default
implementation will be use to translate the compatible types into
JSON native types.
Converts a JSON data structure to a GVariant
.
If signature
is not NULL
, it will be used to resolve ambiguous
data types.
If no error occurs, the resulting GVariant
is guaranteed to conform
to signature
.
If signature
is not NULL
but does not represent a valid GVariant
type
string, NULL
is returned and the error
is set to
G_IO_ERROR_INVALID_ARGUMENT
.
If a signature
is provided but the JSON structure cannot be mapped to it,
NULL
is returned and the error
is set to G_IO_ERROR_INVALID_DATA
.
If signature
is NULL
, the conversion is done based strictly on the types
in the JSON nodes.
The returned variant has a floating reference that will need to be sunk by the caller code.
Converts a JSON string to a GVariant
value.
This function works exactly like [funcJson
.gvariant_deserialize], but
takes a JSON encoded string instead.
The string is first converted to a [structJson
.Node] using
[classJson
.Parser], and then json_gvariant_deserialize
is called on
the node.
The returned variant has a floating reference that will need to be sunk by the caller code.
A JSON data string
The length of json,
or -1 if NUL
-terminated
A valid GVariant
type string
Serializes a GObject
instance into a JSON data stream.
If the object implements the [ifaceJson
.Serializable] interface, it will be
asked to serizalize all its properties; otherwise, the default
implementation will be use to translate the compatible types into JSON
native types.
Check whether a
and b
are equal UTF-8 JSON strings and return an ordering
over them in strcmp()
style.
a JSON string
another JSON string
Check whether a
and b
are equal UTF-8 JSON strings.
a JSON string
another JSON string
Calculate a hash value for the given key
(a UTF-8 JSON string).
Note: Member names are compared byte-wise, without applying any Unicode decomposition or normalisation. This is not explicitly mentioned in the JSON standard (ECMA-404), but is assumed.
a JSON string to hash
Json major version component (e.g. 1 if
JSON_VERSION
is "1.2.3")