json.global

Undocumented in source.

Members

Functions

boxedCanDeserialize
bool boxedCanDeserialize(gobject.types.GType gboxedType, json.types.NodeType nodeType)

Checks whether it is possible to deserialize a GBoxed of type gboxed_type from a json.node.Node of type node_type.

boxedCanSerialize
bool boxedCanSerialize(gobject.types.GType gboxedType, json.types.NodeType nodeType)

Checks whether it is possible to serialize a GBoxed of type gboxed_type into a json.node.Node.

boxedDeserialize
void* boxedDeserialize(gobject.types.GType gboxedType, json.node.Node node)

Deserializes the given json.node.Node into a GBoxed of the given type.

boxedSerialize
json.node.Node boxedSerialize(gobject.types.GType gboxedType, const(void)* boxed)

Serializes a pointer to a GBoxed of the given type into a json.node.Node.

constructGobject
gobject.object.ObjectG constructGobject(gobject.types.GType gtype, string data, size_t length)

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

fromString
json.node.Node fromString(string str)

Parses the given string and returns the corresponding JSON tree.

gobjectDeserialize
gobject.object.ObjectG gobjectDeserialize(gobject.types.GType gtype, json.node.Node node)

Creates a new gobject.object.ObjectG instance of the given type, and constructs it using the members of the object in the given node.

gobjectFromData
gobject.object.ObjectG gobjectFromData(gobject.types.GType gtype, string data, ptrdiff_t length)

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

gobjectSerialize
json.node.Node gobjectSerialize(gobject.object.ObjectG gobject)

Creates a JSON tree representing the passed object instance.

gobjectToData
string gobjectToData(gobject.object.ObjectG gobject, size_t length)

Serializes a gobject.object.ObjectG instance into a JSON data stream, iterating recursively over each property.

gvariantDeserialize
glib.variant.VariantG gvariantDeserialize(json.node.Node jsonNode, string signature)

Converts a JSON data structure to a glib.variant.VariantG.

gvariantDeserializeData
glib.variant.VariantG gvariantDeserializeData(string json, ptrdiff_t length, string signature)

Converts a JSON string to a glib.variant.VariantG value.

gvariantSerialize
json.node.Node gvariantSerialize(glib.variant.VariantG variant)

Converts variant to a JSON tree.

gvariantSerializeData
string gvariantSerializeData(glib.variant.VariantG variant, size_t length)

Converts variant to its JSON encoded string representation.

serializeGobject
string serializeGobject(gobject.object.ObjectG gobject, size_t length)

Serializes a gobject.object.ObjectG instance into a JSON data stream.

stringCompare
int 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.

stringEqual
bool stringEqual(string a, string b)

Check whether a and b are equal UTF-8 JSON strings.

stringHash
uint stringHash(string key)

Calculate a hash value for the given key (a UTF-8 JSON string).

toString_
string toString_(json.node.Node node, bool pretty)

Generates a stringified JSON representation of the contents of the given node.