Function

Json-1.0Jsongobject_from_dataSince 0.10

  • Deserializes a JSON data stream and creates an instance of the given type.

    If the type implements the Json.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

    Type Parameters

    Parameters

    • gtype: GType

      the type of the object to construct

    • data: string

      a JSON data stream

    • length: number

      length of the data stream, or -1 if it is NUL-terminated

    Returns T

    a new object instance of the given type

    0.10