If signature is not NULL, it will be used to resolve ambiguous
data types.
If no error occurs, the resulting GLib.Variant is guaranteed to conform
to signature.
If signature is not NULL but does not represent a valid GLib.Variant 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 data structure to a GLib.Variant.
If
signatureis notNULL, it will be used to resolve ambiguous data types.If no error occurs, the resulting GLib.Variant is guaranteed to conform to
signature.If
signatureis notNULLbut does not represent a valid GLib.Variant type string,NULLis returned and theerroris set toG_IO_ERROR_INVALID_ARGUMENT.If a
signatureis provided but the JSON structure cannot be mapped to it,NULLis returned and theerroris set toG_IO_ERROR_INVALID_DATA.If
signatureisNULL, 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.