json.global

Global functions for json1 library

Functions 19

fnbool boxedCanDeserialize(gobject.types.GType gboxedType, json.types.NodeType nodeType)Checks whether it is possible to deserialize a `GBoxed` of type `gboxedtype` from a [json.node.Node] of type `nodetype`.
fnbool boxedCanSerialize(gobject.types.GType gboxedType, out json.types.NodeType nodeType)Checks whether it is possible to serialize a `GBoxed` of type `gboxed_type` into a [json.node.Node].
fnvoid * boxedDeserialize(gobject.types.GType gboxedType, json.node.Node node)Deserializes the given [json.node.Node] into a `GBoxed` of the given type.
fnjson.node.Node boxedSerialize(gobject.types.GType gboxedType, const(void) * boxed = null)Serializes a pointer to a `GBoxed` of the given type into a [json.node.Node].
fngobject.object.ObjectWrap constructGobject(gobject.types.GType gtype, string data)Deserializes a JSON data stream and creates an instance of the given type.
fnjson.node.Node fromString(string str)Parses the given string and returns the corresponding JSON tree.
fngobject.object.ObjectWrap gobjectDeserialize(gobject.types.GType gtype, json.node.Node node)Creates a new [gobject.object.ObjectWrap] instance of the given type, and constructs it using the members of the object in the given node.
fngobject.object.ObjectWrap gobjectFromData(gobject.types.GType gtype, string data)Deserializes a JSON data stream and creates an instance of the given type.
fnjson.node.Node gobjectSerialize(gobject.object.ObjectWrap gobject)Creates a JSON tree representing the passed object instance.
fnstring gobjectToData(gobject.object.ObjectWrap gobject, out size_t length)Serializes a [gobject.object.ObjectWrap] instance into a JSON data stream, iterating recursively over each property.
fnglib.variant.Variant gvariantDeserialize(json.node.Node jsonNode, string signature = null)Converts a JSON data structure to a [glib.variant.Variant].
fnglib.variant.Variant gvariantDeserializeData(string json, string signature = null)Converts a JSON string to a [glib.variant.Variant] value.
fnjson.node.Node gvariantSerialize(glib.variant.Variant variant)Converts `variant` to a JSON tree.
fnstring gvariantSerializeData(glib.variant.Variant variant, out size_t length)Converts variant to its JSON encoded string representation.
fnstring serializeGobject(gobject.object.ObjectWrap gobject, out size_t length)Serializes a [gobject.object.ObjectWrap] instance into a JSON data stream.
fnint stringCompare(string a, string b)Check whether `a` and `b` are equal UTF-8 JSON strings and return an ordering over them in `strcmp()` style.
fnbool stringEqual(string a, string b)Check whether `a` and `b` are equal UTF-8 JSON strings.
fnuint stringHash(string key)Calculate a hash value for the given key (a UTF-8 JSON string).
fnstring toString_(json.node.Node node, bool pretty)Generates a stringified JSON representation of the contents of the given `node`.