Function

Json-1.0Jsongvariant_deserialize_dataSince 0.14

  • Converts a JSON string to a GLib.Variant value.

    This function works exactly like Json.gvariant_deserialize, but takes a JSON encoded string instead.

    The string is first converted to a Json.Node using Json.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.

    Parameters

    • json: string

      A JSON data string

    • length: number

      The length of json, or -1 if NUL-terminated

    • Optionalsignature: string

      A valid GLib.Variant type string

    Returns GLib.Variant<any>

    A newly created GLib.VariantD compliant

    0.14